“Stack overflow in line 0” on Internet Explorer

后端 未结 13 2098
时光取名叫无心
时光取名叫无心 2020-12-14 00:48

I realise this is not the ideal place to ask about this in terms of searchability, but I\'ve got a page whose JavaScript code throws \"Stack overflow in line 0\" errors when

13条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-14 01:16

    I ran into this problem recently and wrote up a post about the particular case in our code that was causing this problem.

    http://cappuccino.org/discuss/2010/03/01/internet-explorer-global-variables-and-stack-overflows/

    The quick summary is: recursion that passes through the host global object is limited to a stack depth of 13. In other words, if the reference your function call is using (not necessarily the function itself) was defined with some form window.foo = function, then recursing through foo is limited to a depth of 13.

提交回复
热议问题