IE6/7/8 Out of Memory? IE6/7/8 Out of Memory? javascript javascript

IE6/7/8 Out of Memory?


So it turned out to be an issue with IE and everything else handling things differently...as usual.

I have a function that I'm using to throw an error, and it's recursive by design. I wanted the error to be displayed in the main Document, not an iframe (which are being used extensively on this site, unfortunately). The gist of my function is as follows:

myClass.myErrorFunc = function ( msg ) {    if ( parent !== window ) {        parent.myClass.myErrorFunc( msg );    } else {        // display the error    }}

This works GREAT in Chrome and Firefox. It recurses one level and does the error displaying in the main window because once it gets to the top level, the parent is itself. Apparently in IE, however, window's parent is NEVER itself. Thus, infinite recursion.

Stay tuned for a solution.

Edit: Apparently, it was an issue with using !== instead of !=. When I switched it to !=, the second time through (as this is being run from an iframe), window == parent evaluates true, but window === parent does not...

Whatever, I'll take it...

Thanks for your help guys.


It would seem that you take too much memory with something and IE does not have so much memory allocated for that kind of something :) Other browsers do. If you take a look at those line numbers that you have or debug your code with IE8 developer tools you should get your answer.

If it is not a recursion it may be a loop that keeps eating more memory until it runs out.