You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove support of (de)serializing binary byte data between raw data buffer and a UTF-8 string. With TextDecoder and eager handling of 0 as a terminator byte that never quite worked, so it is unlikely that anyone would have ever depended on that feature.
if((u0&0xF8)!=0xF0)warnOnce('Invalid UTF-8 leading byte 0x'+u0.toString(16)+' encountered when deserializing a UTF-8 string on the asm.js/wasm heap to a JS string!');
@@ -548,27 +539,15 @@ function stringToUTF8Array(str, outU8Array, outIdx, maxBytesToWrite) {
548
539
outU8Array[outIdx++]=0xE0|(u>>12);
549
540
outU8Array[outIdx++]=0x80|((u>>6)&63);
550
541
outU8Array[outIdx++]=0x80|(u&63);
551
-
}elseif(u<=0x1FFFFF){
542
+
}else{
552
543
if(outIdx+3>=endIdx)break;
544
+
#if ASSERTIONS
545
+
if(u>=0x200000)warnOnce('Invalid Unicode code point 0x'+u.toString(16)+' encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF).');
0 commit comments