If this isn't possible, are there ways to ask the browser to reserve more memory?
- Recursion that ran too deep. In that case you'll need to review your algorithm to make it more iterative and use less recursion so you don't hit call stack limits imposed by browsers.
- If your algorithm do not have deep recursion, this might still be just a deep enough call, considering that your code is generated.
- Lastly, some engines may allocate function arguments and scoped named variables on some sort of internal stack for fast lookup. If you (or automatically generated code) happens to literally use thousands of local variables or arguments in function, this may overflow engine-specific limits as well.