diff options
Diffstat (limited to 'WebCore/bindings/v8/ScriptCallStack.h')
-rw-r--r-- | WebCore/bindings/v8/ScriptCallStack.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/WebCore/bindings/v8/ScriptCallStack.h b/WebCore/bindings/v8/ScriptCallStack.h index 80d5f76..b608563 100644 --- a/WebCore/bindings/v8/ScriptCallStack.h +++ b/WebCore/bindings/v8/ScriptCallStack.h @@ -48,7 +48,10 @@ class InspectorArray; class ScriptCallStack : public Noncopyable { public: - static ScriptCallStack* create(const v8::Arguments&, unsigned skipArgumentCount = 0); + static const int maxCallStackSizeToCapture; + + static PassOwnPtr<ScriptCallStack> create(const v8::Arguments&, unsigned skipArgumentCount = 0, int framCountLimit = 1); + static PassOwnPtr<ScriptCallStack> create(ScriptState*, v8::Handle<v8::StackTrace>); ~ScriptCallStack(); // Returns false if there is no running JavaScript or if fetching the stack failed. @@ -62,20 +65,19 @@ public: // } static bool stackTrace(int frameLimit, const RefPtr<InspectorArray>& stackTrace); - const ScriptCallFrame& at(unsigned) const; - // FIXME: implement retrieving and storing call stack trace - unsigned size() const { return 1; } + const ScriptCallFrame& at(unsigned); + unsigned size(); ScriptState* state() const { return m_scriptState; } ScriptState* globalState() const { return m_scriptState; } private: - ScriptCallStack(const v8::Arguments& arguments, unsigned skipArgumentCount, String sourceName, int sourceLineNumber, String funcName); - - static bool callLocation(String* sourceName, int* sourceLineNumber, String* functionName); + ScriptCallStack(ScriptState* scriptState, PassOwnPtr<ScriptCallFrame> topFrame, Vector<OwnPtr<ScriptCallFrame> >& scriptCallFrames); + ScriptCallStack(ScriptState* scriptState, v8::Handle<v8::StackTrace> stackTrace); - ScriptCallFrame m_lastCaller; + OwnPtr<ScriptCallFrame> m_topFrame; ScriptState* m_scriptState; + Vector<OwnPtr<ScriptCallFrame> > m_scriptCallFrames; }; } // namespace WebCore |