Index: src/inspector/v8-stack-trace-impl.h |
diff --git a/src/inspector/v8-stack-trace-impl.h b/src/inspector/v8-stack-trace-impl.h |
index 867eb81de017c0c62fb630694546d0ba95511c7e..5ce051bd5c703bbaca938ed6a3e2a3f6463f4b37 100644 |
--- a/src/inspector/v8-stack-trace-impl.h |
+++ b/src/inspector/v8-stack-trace-impl.h |
@@ -33,6 +33,7 @@ class StackFrame { |
int lineNumber() const; // 0-based. |
int columnNumber() const; // 0-based. |
std::unique_ptr<protocol::Runtime::CallFrame> buildInspectorObject() const; |
+ bool isEqual(StackFrame* frame) const; |
private: |
String16 m_functionName; |
@@ -72,12 +73,28 @@ class V8StackTraceImpl : public V8StackTrace { |
const override; |
std::unique_ptr<StringBuffer> toString() const override; |
+ bool isEqualIgnoringTopFrame(V8StackTraceImpl* stackTrace) const; |
+ |
private: |
V8StackTraceImpl(std::vector<std::shared_ptr<StackFrame>> frames, |
int maxAsyncDepth, |
std::shared_ptr<AsyncStackTrace> asyncParent, |
std::shared_ptr<AsyncStackTrace> asyncCreation); |
+ class StackFrameIterator { |
+ public: |
+ explicit StackFrameIterator(const V8StackTraceImpl* stackTrace); |
+ |
+ void next(); |
+ StackFrame* frame(); |
+ bool done(); |
+ |
+ private: |
+ std::vector<std::shared_ptr<StackFrame>>::const_iterator m_currentIt; |
+ std::vector<std::shared_ptr<StackFrame>>::const_iterator m_currentEnd; |
+ AsyncStackTrace* m_parent; |
+ }; |
+ |
std::vector<std::shared_ptr<StackFrame>> m_frames; |
int m_maxAsyncDepth; |
std::weak_ptr<AsyncStackTrace> m_asyncParent; |
@@ -106,6 +123,9 @@ class AsyncStackTrace { |
// TODO(kozyatinskiy): implement it without hack. |
m_description = description; |
} |
+ const std::vector<std::shared_ptr<StackFrame>>& frames() const { |
+ return m_frames; |
+ } |
private: |
AsyncStackTrace(int contextGroupId, const String16& description, |