Yes, this is a problem with the Firefox JavaScript interpreter in general. This is not just eval : if you put fifty thousand lines:
{a:1,b:2,c:3,d:4,e:5,f:6,g:7,h:8,i:9,j:10,a2:1,b2:2,c2:3,d2:4,e2:5,f2:6,g2:7,h2:8,i2:9,j2:10},
in an array literal in a regular script or <script> file, you get exactly the same error.
The complexity of the script block seems to be limited by the compilation time of JS_DEFAULT_SCRIPT_STACK_QUOTA . See 420869 and related errors.
It is relatively unlikely that you should come across this under normal circumstances. Of course, for JSON, you can use JSON.parse , which is not a full JavaScript interpreter, independent of this limitation. If you need an invalid JSON JS parser that has not been touched, I think you will have to write it yourself ... although it will probably be annoyingly slow when you get long input.
source share