| 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 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_ |
| OLD | NEW |