[Bug 25412] Allow some recursion in NodeIterator/TreeWalker

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

--- Comment #19 from Aryeh Gregor <ayg@aryeh.name> ---
(In reply to Anne from comment #16)
> Aryeh, how does it prevent
> https://bugzilla.mozilla.org/show_bug.cgi?id=559526 from happening if we
> just remove the flag?

I don't understand how the crash happened there, but it looks like a QoI issue
to me, not a spec issue.  The code just needs to make sure that it's reentrant
(no static variables, etc.) and allows for the possibility that the current
node changed when the filter was called.  If the spec changes, I'll fix Gecko
and make sure that it doesn't crash on the testcase through some other means.

(In reply to Olli Pettay from comment #18)
> However, disallowing nested calls does prevent certain types of
> programming errors. I can't really see a good use case for nested calls.

Agreed, but I don't see why we should go out of our way to prevent them.  As
Boris alluded to in comment 6, there are other places where we have callbacks,
and we don't require recursion guards like this there.  Removing the active
flag makes the spec that much shorter and simpler, and probably requires fewer
UAs to change (at least among IE/Chrome/Gecko).

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

Received on Friday, 25 April 2014 11:59:14 UTC