merged Fix RangeError: Maximum call stack size exceeded

This commit is contained in:
Lorenzo Pichilli 2022-10-13 16:00:15 +02:00
parent db008bb9c0
commit f0d3039533
3 changed files with 5 additions and 2 deletions

View File

@ -37,6 +37,7 @@
- Fixed Android `RendererPriorityPolicy.waivedWhenNotVisible` type 'Null' is not a subtype of type 'bool'
- Fixed iOS 14.0 crash when calling `callAsyncJavaScript` method
- Merged "Android fix leaking MethodChannel through anonymous class" [#1201](https://github.com/pichillilorenzo/flutter_inappwebview/pull/1201) (thanks to [emakar](https://github.com/emakar))
- Merged "Fix RangeError: Maximum call stack size exceeded" [#1208](https://github.com/pichillilorenzo/flutter_inappwebview/pull/1208) (thanks to [liasica](https://github.com/liasica))
## 5.4.4+3

View File

@ -148,7 +148,8 @@ public class JavaScriptBridgeJS {
" });" +
" }," +
" arrayBufferToString: function(arrayBuffer) {" +
" return String.fromCharCode.apply(String, arrayBuffer);" +
" var uint8Array = new Uint8Array(arrayBuffer);" +
" return uint8Array.reduce(function(acc, i) { return acc += String.fromCharCode.apply(null, [i]); }, '');" +
" }," +
" isBodyFormData: function(bodyString) {" +
" return bodyString.indexOf('------WebKitFormBoundary') >= 0;" +

View File

@ -175,7 +175,8 @@ let UTIL_JS_SOURCE = """
});
},
arrayBufferToString: function(arrayBuffer) {
return String.fromCharCode.apply(String, arrayBuffer);
var uint8Array = new Uint8Array(arrayBuffer);
return uint8Array.reduce(function(acc, i) { return acc += String.fromCharCode.apply(null, [i]); }, '');
},
isBodyFormData: function(bodyString) {
return bodyString.indexOf('------WebKitFormBoundary') >= 0;