[Bug 25412] Allow some recursion in NodeIterator/TreeWalker

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

--- Comment #43 from Boris Zbarsky <bzbarsky@mit.edu> ---
> Do you think exact behavior in the event of recursion here is
> likely to have any implications for web compat?

I have a hard time judging likelihood here.  I know for a fact I've encountered
cases where pages expected an operation to either throw or work a specific way
and broke when it didn't throw and didn't do that specific thing.  So I'm wary
of assuming that something that throws in one UA but doesn't in others is OK to
not throw but also not match the other UAs.

> Are there any specific edge cases you would like tested?

I haven't looked at this API in enough depth recently to answer this question
off the top of my head.  I can try to make time to do that if no one else has
either, I guess.

> By the way, these issues with recursion are similar to what comes up if you set
> TreeWalker's .currentNode from the filter, right?

Somewhat, yes.

In terms of implementation complexity, prohibiting something outright is _way_
easier to implement and reason about than allowing it but verifying that it
does not violate various invariants.  So if the goal is to have as little
implementation change as possible, measured in man-hours of both implementors
and spec writers, throwing on reentry is the thing to do, just fwiw.

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

Received on Monday, 22 August 2016 18:56:11 UTC