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

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

Issue 2868423004: Revert of [inspector] use creation stack trace as parent for async call chains (Closed)
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « src/inspector/v8-debugger.cc ('k') | src/inspector/v8-stack-trace-impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_INSPECTOR_V8STACKTRACEIMPL_H_ 5 #ifndef V8_INSPECTOR_V8STACKTRACEIMPL_H_
6 #define V8_INSPECTOR_V8STACKTRACEIMPL_H_ 6 #define V8_INSPECTOR_V8STACKTRACEIMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 std::unique_ptr<protocol::Runtime::StackTrace> buildInspectorObject( 96 std::unique_ptr<protocol::Runtime::StackTrace> buildInspectorObject(
97 AsyncStackTrace* asyncCreation, int maxAsyncDepth) const; 97 AsyncStackTrace* asyncCreation, int maxAsyncDepth) const;
98 98
99 int contextGroupId() const; 99 int contextGroupId() const;
100 const String16& description() const; 100 const String16& description() const;
101 std::weak_ptr<AsyncStackTrace> parent() const; 101 std::weak_ptr<AsyncStackTrace> parent() const;
102 std::weak_ptr<AsyncStackTrace> creation() const; 102 std::weak_ptr<AsyncStackTrace> creation() const;
103 bool isEmpty() const; 103 bool isEmpty() const;
104 104
105 void setDescription(const String16& description) {
106 // TODO(kozyatinskiy): implement it without hack.
107 DCHECK(!m_description.length() || m_description == description);
108 m_description = description;
109 }
110
111 private: 105 private:
112 AsyncStackTrace(int contextGroupId, const String16& description, 106 AsyncStackTrace(int contextGroupId, const String16& description,
113 std::vector<std::shared_ptr<StackFrame>> frames, 107 std::vector<std::shared_ptr<StackFrame>> frames,
114 std::shared_ptr<AsyncStackTrace> asyncParent, 108 std::shared_ptr<AsyncStackTrace> asyncParent,
115 std::shared_ptr<AsyncStackTrace> asyncCreation); 109 std::shared_ptr<AsyncStackTrace> asyncCreation);
116 110
117 int m_contextGroupId; 111 int m_contextGroupId;
118 String16 m_description; 112 String16 m_description;
119 113
120 std::vector<std::shared_ptr<StackFrame>> m_frames; 114 std::vector<std::shared_ptr<StackFrame>> m_frames;
121 std::weak_ptr<AsyncStackTrace> m_asyncParent; 115 std::weak_ptr<AsyncStackTrace> m_asyncParent;
122 std::weak_ptr<AsyncStackTrace> m_asyncCreation; 116 std::weak_ptr<AsyncStackTrace> m_asyncCreation;
123 117
124 DISALLOW_COPY_AND_ASSIGN(AsyncStackTrace); 118 DISALLOW_COPY_AND_ASSIGN(AsyncStackTrace);
125 }; 119 };
126 120
127 } // namespace v8_inspector 121 } // namespace v8_inspector
128 122
129 #endif // V8_INSPECTOR_V8STACKTRACEIMPL_H_ 123 #endif // V8_INSPECTOR_V8STACKTRACEIMPL_H_
OLDNEW
« no previous file with comments | « src/inspector/v8-debugger.cc ('k') | src/inspector/v8-stack-trace-impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698