I have a page, that works fine in FF and IE. However, chrome throws
jquery.min.js:2 Uncaught RangeError: Maximum call stack size exceeded
It's because of trying to process a lot of data (see Chrome RangeError: Maximum call stack size exceeded when using jQuery $.map).
Is it possible to catch
the error, so that the whole page's javascript doesn't hang? Or do I have to reduce the amount of data for chrome.
I have a page, that works fine in FF and IE. However, chrome throws
jquery.min.js:2 Uncaught RangeError: Maximum call stack size exceeded
It's because of trying to process a lot of data (see Chrome RangeError: Maximum call stack size exceeded when using jQuery $.map).
Is it possible to catch
the error, so that the whole page's javascript doesn't hang? Or do I have to reduce the amount of data for chrome.
RangeError
. I don't understand the downvotes...
– mreq
Commented
Aug 20, 2012 at 15:58
try..catch
or window.onerror
. But, what are you hoping to get out of that other than a solution to the problem?
– Jonathan Lonowski
Commented
Aug 20, 2012 at 16:10
JavaScript doesn't support Tail Recursion. You're probably calling a function from a function from a function until it blows. (Please post some code to show what you're doing).
Use a setTimeout between 'iterations'. This way you don't block the UI or blow up the stack.