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 <vector> |
| 9 |
8 #include "src/base/macros.h" | 10 #include "src/base/macros.h" |
9 #include "src/inspector/protocol/Forward.h" | 11 #include "src/inspector/protocol/Forward.h" |
10 #include "src/inspector/protocol/Runtime.h" | 12 #include "src/inspector/protocol/Runtime.h" |
11 | 13 |
12 #include "include/v8-inspector.h" | 14 #include "include/v8-inspector.h" |
13 | 15 |
14 #include <vector> | |
15 | |
16 namespace v8_inspector { | 16 namespace v8_inspector { |
17 | 17 |
18 class TracedValue; | 18 class TracedValue; |
19 class V8Debugger; | 19 class V8Debugger; |
20 | 20 |
21 // Note: async stack trace may have empty top stack with non-empty tail to | 21 // Note: async stack trace may have empty top stack with non-empty tail to |
22 // indicate | 22 // indicate |
23 // that current native-only state had some async story. | 23 // that current native-only state had some async story. |
24 // On the other hand, any non-top async stack is guaranteed to be non-empty. | 24 // On the other hand, any non-top async stack is guaranteed to be non-empty. |
25 class V8StackTraceImpl final : public V8StackTrace { | 25 class V8StackTraceImpl final : public V8StackTrace { |
26 DISALLOW_COPY_AND_ASSIGN(V8StackTraceImpl); | |
27 | |
28 public: | 26 public: |
29 static const size_t maxCallStackSizeToCapture = 200; | 27 static const size_t maxCallStackSizeToCapture = 200; |
30 | 28 |
31 class Frame { | 29 class Frame { |
32 public: | 30 public: |
33 Frame(); | 31 Frame(); |
34 Frame(const String16& functionName, const String16& scriptId, | 32 Frame(const String16& functionName, const String16& scriptId, |
35 const String16& scriptName, int lineNumber, int column = 0); | 33 const String16& scriptName, int lineNumber, int column = 0); |
36 ~Frame(); | 34 ~Frame(); |
37 | 35 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 83 |
86 private: | 84 private: |
87 V8StackTraceImpl(int contextGroupId, const String16& description, | 85 V8StackTraceImpl(int contextGroupId, const String16& description, |
88 std::vector<Frame>& frames, | 86 std::vector<Frame>& frames, |
89 std::unique_ptr<V8StackTraceImpl> parent); | 87 std::unique_ptr<V8StackTraceImpl> parent); |
90 | 88 |
91 int m_contextGroupId; | 89 int m_contextGroupId; |
92 String16 m_description; | 90 String16 m_description; |
93 std::vector<Frame> m_frames; | 91 std::vector<Frame> m_frames; |
94 std::unique_ptr<V8StackTraceImpl> m_parent; | 92 std::unique_ptr<V8StackTraceImpl> m_parent; |
| 93 |
| 94 DISALLOW_COPY_AND_ASSIGN(V8StackTraceImpl); |
95 }; | 95 }; |
96 | 96 |
97 } // namespace v8_inspector | 97 } // namespace v8_inspector |
98 | 98 |
99 #endif // V8_INSPECTOR_V8STACKTRACEIMPL_H_ | 99 #endif // V8_INSPECTOR_V8STACKTRACEIMPL_H_ |
OLD | NEW |