OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium 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 V8StackTraceImpl_h | 5 #ifndef V8StackTraceImpl_h |
6 #define V8StackTraceImpl_h | 6 #define V8StackTraceImpl_h |
7 | 7 |
| 8 #include "platform/inspector_protocol/Allocator.h" |
8 #include "platform/inspector_protocol/Platform.h" | 9 #include "platform/inspector_protocol/Platform.h" |
| 10 #include "platform/v8_inspector/protocol/Runtime.h" |
9 #include "platform/v8_inspector/public/V8StackTrace.h" | 11 #include "platform/v8_inspector/public/V8StackTrace.h" |
10 | 12 |
11 #include <vector> | 13 #include <vector> |
12 | 14 |
13 namespace blink { | 15 namespace blink { |
14 | 16 |
15 class TracedValue; | 17 class TracedValue; |
16 class V8DebuggerImpl; | 18 class V8DebuggerImpl; |
17 | 19 |
18 // Note: async stack trace may have empty top stack with non-empty tail to indic
ate | 20 // Note: async stack trace may have empty top stack with non-empty tail to indic
ate |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 | 52 |
51 static void setCaptureStackTraceForUncaughtExceptions(v8::Isolate*, bool cap
ture); | 53 static void setCaptureStackTraceForUncaughtExceptions(v8::Isolate*, bool cap
ture); |
52 static std::unique_ptr<V8StackTraceImpl> create(V8DebuggerImpl*, int context
GroupId, v8::Local<v8::StackTrace>, size_t maxStackSize, const String16& descrip
tion = String16()); | 54 static std::unique_ptr<V8StackTraceImpl> create(V8DebuggerImpl*, int context
GroupId, v8::Local<v8::StackTrace>, size_t maxStackSize, const String16& descrip
tion = String16()); |
53 static std::unique_ptr<V8StackTraceImpl> capture(V8DebuggerImpl*, int contex
tGroupId, size_t maxStackSize, const String16& description = String16()); | 55 static std::unique_ptr<V8StackTraceImpl> capture(V8DebuggerImpl*, int contex
tGroupId, size_t maxStackSize, const String16& description = String16()); |
54 | 56 |
55 std::unique_ptr<V8StackTrace> clone() override; | 57 std::unique_ptr<V8StackTrace> clone() override; |
56 std::unique_ptr<V8StackTraceImpl> cloneImpl(); | 58 std::unique_ptr<V8StackTraceImpl> cloneImpl(); |
57 std::unique_ptr<V8StackTrace> isolatedCopy() override; | 59 std::unique_ptr<V8StackTrace> isolatedCopy() override; |
58 std::unique_ptr<V8StackTraceImpl> isolatedCopyImpl(); | 60 std::unique_ptr<V8StackTraceImpl> isolatedCopyImpl(); |
59 std::unique_ptr<protocol::Runtime::StackTrace> buildInspectorObjectForTail(V
8DebuggerImpl*) const; | 61 std::unique_ptr<protocol::Runtime::StackTrace> buildInspectorObjectForTail(V
8DebuggerImpl*) const; |
| 62 std::unique_ptr<protocol::Runtime::StackTrace> buildInspectorObjectImpl() co
nst; |
60 ~V8StackTraceImpl() override; | 63 ~V8StackTraceImpl() override; |
61 | 64 |
62 // V8StackTrace implementation. | 65 // V8StackTrace implementation. |
63 bool isEmpty() const override { return !m_frames.size(); }; | 66 bool isEmpty() const override { return !m_frames.size(); }; |
64 String16 topSourceURL() const override; | 67 String16 topSourceURL() const override; |
65 int topLineNumber() const override; | 68 int topLineNumber() const override; |
66 int topColumnNumber() const override; | 69 int topColumnNumber() const override; |
67 String16 topScriptId() const override; | 70 String16 topScriptId() const override; |
68 String16 topFunctionName() const override; | 71 String16 topFunctionName() const override; |
69 std::unique_ptr<protocol::Runtime::StackTrace> buildInspectorObject() const
override; | 72 std::unique_ptr<protocol::Runtime::Exported::StackTrace> buildInspectorObjec
t() const override; |
70 String16 toString() const override; | 73 String16 toString() const override; |
71 | 74 |
72 private: | 75 private: |
73 V8StackTraceImpl(int contextGroupId, const String16& description, std::vecto
r<Frame>& frames, std::unique_ptr<V8StackTraceImpl> parent); | 76 V8StackTraceImpl(int contextGroupId, const String16& description, std::vecto
r<Frame>& frames, std::unique_ptr<V8StackTraceImpl> parent); |
74 | 77 |
75 int m_contextGroupId; | 78 int m_contextGroupId; |
76 String16 m_description; | 79 String16 m_description; |
77 std::vector<Frame> m_frames; | 80 std::vector<Frame> m_frames; |
78 std::unique_ptr<V8StackTraceImpl> m_parent; | 81 std::unique_ptr<V8StackTraceImpl> m_parent; |
79 }; | 82 }; |
80 | 83 |
81 } // namespace blink | 84 } // namespace blink |
82 | 85 |
83 #endif // V8StackTraceImpl_h | 86 #endif // V8StackTraceImpl_h |
OLD | NEW |