Ignore:
Timestamp:
Aug 8, 2013, 9:57:07 AM (12 years ago)
Author:
[email protected]
Message:

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):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/interpreter/Interpreter.h

    r153823 r153825  
    234234        JS_EXPORT_PRIVATE void dumpCallFrame(CallFrame*);
    235235
    236         JS_EXPORT_PRIVATE void getStackTrace(Vector<StackFrame>& results, size_t maxStackSize = std::numeric_limits<size_t>::max());
    237 
    238236    private:
    239237        enum ExecutionFlag { Normal, InitializeAndReturn };
     
    243241        JSValue execute(CallFrameClosure&);
    244242
     243        void getStackTrace(Vector<StackFrame>& results, size_t maxStackSize = std::numeric_limits<size_t>::max());
    245244        NEVER_INLINE bool unwindCallFrame(StackIterator&, JSValue);
    246245
Note: See TracChangeset for help on using the changeset viewer.