[Bug 25412] Allow some recursion in NodeIterator/TreeWalker

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

--- Comment #34 from Aryeh Gregor <ayg@aryeh.name> ---
I don't think it makes sense to add this flag here unless we add such a flag in
every case where we allow the user to supply a callback of some kind.  What's
special here?  If UAs don't want to crash on recursive JS calls, they need
general protection against it to prevent function f() { f() }; f() from
crashing.  I tested in Edge and Chrome just now, and both allow recursion in
this case (100 for Chrome and 10000 for IE).  Edge, Firefox, and Chrome also
all have some sort of generic limit against infinite recursion in JavaScript:

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/4387

So no, I definitely do not think we should revert to the previous spec, since
the current spec matches all UAs other than Gecko, and is simpler and more
consistent.  Gecko should change, and if they (we) have concerns about crashes,
that's a QoI issue that all other UAs seem to have dealt with to their
satisfaction without imposing a special recursion guard.  And which Gecko deals
with for all other JS.

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

Received on Wednesday, 17 August 2016 13:22:21 UTC