[Bug 25412] Allow some recursion in NodeIterator/TreeWalker

https://www.w3.org/Bugs/Public/show_bug.cgi?id=25412

--- Comment #3 from Aryeh Gregor <ayg@aryeh.name> ---
(In reply to Olli Pettay from comment #1)
> The flag does make sense to me.
> What should nextNode() do if filter calls it recursively?

As now, except instead of a boolean flag to determine whether to throw
InvalidStateError, have a counter that tracks recursion depth and only throw if
it gets too high.  This still avoids crashes or running out of stack space, but
is more generous in case the code does a limited amount of recursion for some
reason.  I don't think we need to make all recursion throw, if we're only
concerned about not running out of stack space -- given that Chrome and IE both
do allow limited recursion.

(In reply to Boris Zbarsky from comment #2)
> Aryeh, it sounds probable that Chrome and IE are just hitting stack limits
> and throwing due to being out of stack space...  Good luck specifying that.

IE, maybe, but Chrome's limit is much too low to just be running out of stack
space -- a maximum depth of around 20.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Wednesday, 23 April 2014 12:08:48 UTC