Restoring use of StackIterator instead of Interpreter::getStacktrace().
authormark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Aug 2013 16:57:07 +0000 (16:57 +0000)
committermark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Aug 2013 16:57:07 +0000 (16:57 +0000)
commitf3fca191287ebb51778ded54ac3263169cbc2122
tree5410c8a210af7e876720b760900c7d9449209f2f
parent78861c345f149b4a927ed72f7d4387c8ed1a4cc9
Restoring use of StackIterator instead of Interpreter::getStacktrace().
https://bugs.webkit.org/show_bug.cgi?id=119575.

Reviewed by Oliver Hunt.

Source/JavaScriptCore:

* interpreter/Interpreter.h:
- Made getStackTrace() private.
* interpreter/StackIterator.cpp:
(JSC::StackIterator::StackIterator):
(JSC::StackIterator::numberOfFrames):
- Computes the number of frames by iterating through the whole stack
  from the starting frame. The iterator will save its current frame
  position before counting the frames, and then restoring it after
  the counting.
(JSC::StackIterator::gotoFrameAtIndex):
(JSC::StackIterator::gotoNextFrame):
(JSC::StackIterator::resetIterator):
- Points the iterator to the starting frame.
* interpreter/StackIteratorPrivate.h:

Source/WebCore:

No new tests.

* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStack):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@153825 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/interpreter/Interpreter.h
Source/JavaScriptCore/interpreter/StackIterator.cpp
Source/JavaScriptCore/interpreter/StackIteratorPrivate.h
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/ScriptCallStackFactory.cpp