Posts tagged ‘browsers’

Limitation on call stacks

Fellow Yahoo! Nicholas Zakas has blogged about some browsers limitations and recently ran some tests in order to check browsers call stack sizes.

Not surprisingly, different browsers have different call stack sizes. Also not surprisingly, the method that they use to determine the call stack varies as well. The various call stack sizes I could measure are (give or take, might be off by 1 or 2):

  • Internet Explorer 7: 1,789
  • Firefox 3: 3,000
  • Chrome 1: 21,837
  • Opera 9.62: 10,000
  • Safari 3.2: 500

In each case, the browser will end up stopping your code and (hopefully) display a message about the issue:

  • Internet Explorer 7: “Stack overflow at line x”
  • Firefox 3:”Too much recursion”
  • Chrome 1: n/a
  • Opera 9.62: “Abort (control stack overflow)”
  • Safari 3.2:”RangeError: Maximum call stack size exceeded.”

Continue reading ‘Limitation on call stacks’ »