goupviet / base2

Automatically exported from code.google.com/p/base2
0 stars 0 forks source link

JSON on Safari can't handle big structures #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When serializing a big structure to a JSON-string, Safari raises the error 
"Maximum call stack size 
exceeded". See attached test-case.

This is actually caused by a bug in Safari: 
http://bugs.webkit.org/show_bug.cgi?id=4045

This is a won't fix in base2, but when you might encounter this bug, you know 
where to look.

Can someone verify this for Safari beta 3 on Windows?

Original issue reported on code.google.com by doek...@gmail.com on 9 Jul 2007 at 4:42

Attachments:

GoogleCodeExporter commented 9 years ago
One more note: if you use the method "apply" like below, you get 49 stack 
levels (actually, the apply in itself is a 
also a call, so you still have a 100 level limit, but not what you thought):

var i=0;
var recursionTest=function() {
  i++;
  arguments.callee.apply(this,arguments);
}

Original comment by doek...@gmail.com on 9 Jul 2007 at 5:23

GoogleCodeExporter commented 9 years ago

Original comment by doek...@gmail.com on 14 Jul 2007 at 7:29