OLD | NEW |
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 Loading... |
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 m_description = description; |
| 108 } |
| 109 |
105 private: | 110 private: |
106 AsyncStackTrace(int contextGroupId, const String16& description, | 111 AsyncStackTrace(int contextGroupId, const String16& description, |
107 std::vector<std::shared_ptr<StackFrame>> frames, | 112 std::vector<std::shared_ptr<StackFrame>> frames, |
108 std::shared_ptr<AsyncStackTrace> asyncParent, | 113 std::shared_ptr<AsyncStackTrace> asyncParent, |
109 std::shared_ptr<AsyncStackTrace> asyncCreation); | 114 std::shared_ptr<AsyncStackTrace> asyncCreation); |
110 | 115 |
111 int m_contextGroupId; | 116 int m_contextGroupId; |
112 String16 m_description; | 117 String16 m_description; |
113 | 118 |
114 std::vector<std::shared_ptr<StackFrame>> m_frames; | 119 std::vector<std::shared_ptr<StackFrame>> m_frames; |
115 std::weak_ptr<AsyncStackTrace> m_asyncParent; | 120 std::weak_ptr<AsyncStackTrace> m_asyncParent; |
116 std::weak_ptr<AsyncStackTrace> m_asyncCreation; | 121 std::weak_ptr<AsyncStackTrace> m_asyncCreation; |
117 | 122 |
118 DISALLOW_COPY_AND_ASSIGN(AsyncStackTrace); | 123 DISALLOW_COPY_AND_ASSIGN(AsyncStackTrace); |
119 }; | 124 }; |
120 | 125 |
121 } // namespace v8_inspector | 126 } // namespace v8_inspector |
122 | 127 |
123 #endif // V8_INSPECTOR_V8STACKTRACEIMPL_H_ | 128 #endif // V8_INSPECTOR_V8STACKTRACEIMPL_H_ |
OLD | NEW |