-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maximum call size exceeded #2
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: