Web Inspector: replace recursion with a stack in DOM nodes snapshot traversal.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Jul 2012 14:18:25 +0000 (14:18 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Jul 2012 14:18:25 +0000 (14:18 +0000)
commit91c4e47c02a28881e515d91c58a6648b18f04216
tree02029a75a79938288c4526dd67db77c56aa625a8
parent75b020d2c331e7f9adcef288c7fc5c8ef9aa0498
Web Inspector: replace recursion with a stack in DOM nodes snapshot traversal.
https://bugs.webkit.org/show_bug.cgi?id=89889

Number of DOM nodes native snapshots can handle was limited
by the process stack size because of recursion used to traverse the nodes.
The patch changes the recursion to a stack based algorithm.

Patch by Alexei Filippov <alexeif@chromium.org> on 2012-07-02
Reviewed by Yury Semikhatsky.

* dom/MemoryInstrumentation.h:
(MemoryInstrumentation):
(InstrumentedPointerBase):
(WebCore::MemoryInstrumentation::InstrumentedPointerBase::~InstrumentedPointerBase):
(InstrumentedPointer):
(WebCore::MemoryInstrumentation::InstrumentedPointer::InstrumentedPointer):
(WebCore::MemoryInstrumentation::reportInstrumentedPointer):
(WebCore):
(WebCore::::process):
* inspector/InspectorMemoryAgent.cpp:
(WebCore):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121677 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/MemoryInstrumentation.h
Source/WebCore/inspector/InspectorMemoryAgent.cpp