See the following URL for all the gory details:

But to sum up, the following test case will get an "out of stack
space" error in IE8 when it is running in IE8 Standards mode (you can
check the mode by hitting F12 for the Developer Tools). If you comment
out either the Function.prototype line or the Array.prototype line,
you won't get the error.

Because Prototype adds functions to both Array.prototype and
Function.prototype, pages that use Prototype will get the "out of
stack space" error whenever they try to use the native JSON parser to
parse some JSON that contains an array. But only if they pass a
"reviver" function to the JSON.parse() method. Which, unfortunately,
is pretty common in order to handle dates.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

    <html xmlns="";>
    <script type="text/javascript">

    Function.prototype.test1 = function() { };
    Array.prototype.test2 = function() { };

    window.onload = function()
        alert(JSON.parse('{ "foo": [1,2,3] }', function(k,v) { return
v; }));


You received this message because you are subscribed to the Google Groups 
"Prototype &" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to