Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(560)

Unified Diff: src/inspector/v8-stack-trace-impl.h

Issue 2879923003: [inspector] added targetCallFrames for continueToLocation (Closed)
Patch Set: ac Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/inspector/v8-debugger-agent-impl.cc ('k') | src/inspector/v8-stack-trace-impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « src/inspector/v8-debugger-agent-impl.cc ('k') | src/inspector/v8-stack-trace-impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698