[Bug 25412] Allow some recursion in NodeIterator/TreeWalker

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

--- Comment #4 from Boris Zbarsky <bzbarsky@mit.edu> ---
> but Chrome's limit is much too low to just be running out of stack space -- a
> maximum depth of around 20

So I just poked around in Chrome's code and there is no limit check of any sort
in the following functions: NodeIteratorBase::acceptNode,
NodeIterator::nextNode, NodeIterator::previousNode, NodeFilter::acceptNode.

The exception message in this case is "Maximum call stack size exceeded."  The
only place that string appears in the Blink code is in V8Binding.cpp in the
handleMaxRecursionDepthExceeded function.  The only callers of that function
are in V8ScriptRunner.cpp, which compares the recursion level to
kMaxRecursionDepth before calling out into JS.  So this is not something
specific to NodeIterator/TreeWalker, but a general limit of some sort Chrome
has on invoking JS from C++.  kMaxRecursionDepth seems to be set to 22.

I don't think we want to duplicate this behavior across the whole platform.

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

Received on Wednesday, 23 April 2014 14:08:36 UTC