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) {
405
405
*/
406
406
jspb . BinaryDecoder . prototype . checkCursor = function ( ) {
407
407
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_ ) ;
409
409
}
410
410
}
411
411
@@ -902,23 +902,10 @@ jspb.BinaryDecoder.prototype.readString = function (length, requireUtf8) {
902
902
this . cursor_ += length ;
903
903
this . checkCursor ( ) ;
904
904
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 ) ;
906
906
return result ;
907
907
} ;
908
908
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
-
922
909
/**
923
910
* Reads a block of raw bytes from the binary stream.
924
911
*
Original file line number Diff line number Diff line change @@ -326,7 +326,7 @@ let textEncoderInstance;
326
326
jspb . binary . utf8 . textEncoderEncode = function (
327
327
/** string */ s , /** boolean */ rejectUnpairedSurrogates ) {
328
328
if ( rejectUnpairedSurrogates ) {
329
- checkWellFormed ( s ) ;
329
+ jspb . binary . utf8 . checkWellFormed ( s ) ;
330
330
}
331
331
332
332
if ( ! textEncoderInstance ) {
@@ -423,4 +423,3 @@ jspb.binary.utf8.encodeUtf8 = function (
423
423
jspb . binary . utf8 . textEncoderEncode ( string , rejectUnpairedSurrogates ) :
424
424
jspb . binary . utf8 . polyfillEncode ( string , rejectUnpairedSurrogates ) ;
425
425
}
426
-
You can’t perform that action at this time.
0 commit comments