aboutsummaryrefslogtreecommitdiffhomepage
path: root/js/binary/writer.js
diff options
context:
space:
mode:
authorGravatar Adam Cozzette <acozzette@google.com>2018-03-13 16:37:29 -0700
committerGravatar Adam Cozzette <acozzette@google.com>2018-03-13 16:37:29 -0700
commit0400cca3236de1ca303af38bf81eab332d042b7c (patch)
treea8a9b19853f64567c96750a1c7d253926471daa5 /js/binary/writer.js
parent96b535cc2f4f7b7e22a1b8622149f7c26a5a3f63 (diff)
Integrated internal changes from Google
Diffstat (limited to 'js/binary/writer.js')
-rw-r--r--js/binary/writer.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/js/binary/writer.js b/js/binary/writer.js
index 8a018058..287d29c3 100644
--- a/js/binary/writer.js
+++ b/js/binary/writer.js
@@ -236,10 +236,12 @@ jspb.BinaryWriter.prototype.getResultBuffer = function() {
/**
* Converts the encoded data into a base64-encoded string.
+ * @param {boolean=} opt_webSafe True indicates we should use a websafe
+ * alphabet, which does not require escaping for use in URLs.
* @return {string}
*/
-jspb.BinaryWriter.prototype.getResultBase64String = function() {
- return goog.crypt.base64.encodeByteArray(this.getResultBuffer());
+jspb.BinaryWriter.prototype.getResultBase64String = function(opt_webSafe) {
+ return goog.crypt.base64.encodeByteArray(this.getResultBuffer(), opt_webSafe);
};