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
I found when I was decompressing a large piece of data in Chrome stable, I would get a 'RangeError: Maximum call size exceeded'. I tracked this down, the problem is in JSONC.unpack, which calls String.fromCharCode.apply() on the decoded data. When the data is very long, you reach the argument limit of the VM. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply
But beware: in using apply this way, you run the risk of exceeding the JavaScript engine's argument length limit. The consequences of applying a function with too many arguments (think more than tens of thousands of arguments) vary across engines...
I patched this locally by wrapping the call in a try/catch, and if the RangeError happens, I loop through the data and call fromCharCode() on each iteration, instead of calling apply- same effect. I will submit a pull request.
The text was updated successfully, but these errors were encountered:
I found when I was decompressing a large piece of data in Chrome stable, I would get a 'RangeError: Maximum call size exceeded'. I tracked this down, the problem is in JSONC.unpack, which calls String.fromCharCode.apply() on the decoded data. When the data is very long, you reach the argument limit of the VM. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply
I patched this locally by wrapping the call in a try/catch, and if the RangeError happens, I loop through the data and call fromCharCode() on each iteration, instead of calling apply- same effect. I will submit a pull request.
The text was updated successfully, but these errors were encountered: