File tree Expand file tree Collapse file tree 2 files changed +3
-17
lines changed
Expand file tree Collapse file tree 2 files changed +3
-17
lines changed Original file line number Diff line number Diff line change @@ -405,7 +405,7 @@ jspb.BinaryDecoder.prototype.readSplitFixed64 = function(convert) {
405405 */
406406jspb . BinaryDecoder . prototype . checkCursor = function ( ) {
407407 if ( this . cursor_ > this . end_ ) {
408- asserts . fail ( 'Read past the end ' + this . cursor_ + ' > ' + this . end_ ) ;
408+ jspb . asserts . fail ( 'Read past the end ' + this . cursor_ + ' > ' + this . end_ ) ;
409409 }
410410}
411411
@@ -902,23 +902,10 @@ jspb.BinaryDecoder.prototype.readString = function (length, requireUtf8) {
902902 this . cursor_ += length ;
903903 this . checkCursor ( ) ;
904904 const result =
905- jspb . binary . utf8 . decodeUtf8 ( jspb . asserts . assert ( this . bytes_ ) , cursor , length , requireUtf8 ) ;
905+ jspb . binary . utf8 . decodeUtf8 ( jspb . asserts . assert ( this . bytes_ ) , cursor , length , requireUtf8 ) ;
906906 return result ;
907907} ;
908908
909-
910- /**
911- * Reads and parses a UTF-8 encoded unicode string (with length prefix) from
912- * the stream.
913- * @return {string } The decoded string.
914- * @export
915- */
916- jspb . BinaryDecoder . prototype . readStringWithLength = function ( ) {
917- var length = this . readUnsignedVarint32 ( ) ;
918- return this . readString ( length ) ;
919- } ;
920-
921-
922909/**
923910 * Reads a block of raw bytes from the binary stream.
924911 *
Original file line number Diff line number Diff line change @@ -326,7 +326,7 @@ let textEncoderInstance;
326326jspb . binary . utf8 . textEncoderEncode = function (
327327 /** string */ s , /** boolean */ rejectUnpairedSurrogates ) {
328328 if ( rejectUnpairedSurrogates ) {
329- checkWellFormed ( s ) ;
329+ jspb . binary . utf8 . checkWellFormed ( s ) ;
330330 }
331331
332332 if ( ! textEncoderInstance ) {
@@ -423,4 +423,3 @@ jspb.binary.utf8.encodeUtf8 = function (
423423 jspb . binary . utf8 . textEncoderEncode ( string , rejectUnpairedSurrogates ) :
424424 jspb . binary . utf8 . polyfillEncode ( string , rejectUnpairedSurrogates ) ;
425425}
426-
You can’t perform that action at this time.
0 commit comments