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/Collections.h" | 8 #include "platform/inspector_protocol/Collections.h" |
9 #include "platform/v8_inspector/public/V8StackTrace.h" | 9 #include "platform/v8_inspector/public/V8StackTrace.h" |
10 #include "wtf/PtrUtil.h" | 10 #include "wtf/PtrUtil.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 public: | 24 public: |
25 Frame(); | 25 Frame(); |
26 Frame(const String16& functionName, const String16& scriptId, const Stri
ng16& scriptName, int lineNumber, int column = 0); | 26 Frame(const String16& functionName, const String16& scriptId, const Stri
ng16& scriptName, int lineNumber, int column = 0); |
27 ~Frame(); | 27 ~Frame(); |
28 | 28 |
29 const String16& functionName() const { return m_functionName; } | 29 const String16& functionName() const { return m_functionName; } |
30 const String16& scriptId() const { return m_scriptId; } | 30 const String16& scriptId() const { return m_scriptId; } |
31 const String16& sourceURL() const { return m_scriptName; } | 31 const String16& sourceURL() const { return m_scriptName; } |
32 int lineNumber() const { return m_lineNumber; } | 32 int lineNumber() const { return m_lineNumber; } |
33 int columnNumber() const { return m_columnNumber; } | 33 int columnNumber() const { return m_columnNumber; } |
| 34 Frame isolatedCopy() const; |
34 | 35 |
35 private: | 36 private: |
36 friend class V8StackTraceImpl; | 37 friend class V8StackTraceImpl; |
37 std::unique_ptr<protocol::Runtime::CallFrame> buildInspectorObject() con
st; | 38 std::unique_ptr<protocol::Runtime::CallFrame> buildInspectorObject() con
st; |
38 void toTracedValue(TracedValue*) const; | 39 void toTracedValue(TracedValue*) const; |
39 | 40 |
40 String16 m_functionName; | 41 String16 m_functionName; |
41 String16 m_scriptId; | 42 String16 m_scriptId; |
42 String16 m_scriptName; | 43 String16 m_scriptName; |
43 int m_lineNumber; | 44 int m_lineNumber; |
44 int m_columnNumber; | 45 int m_columnNumber; |
45 }; | 46 }; |
46 | 47 |
47 static std::unique_ptr<V8StackTraceImpl> create(V8DebuggerAgentImpl*, v8::Lo
cal<v8::StackTrace>, size_t maxStackSize, const String16& description = String16
()); | 48 static std::unique_ptr<V8StackTraceImpl> create(V8DebuggerAgentImpl*, v8::Lo
cal<v8::StackTrace>, size_t maxStackSize, const String16& description = String16
()); |
48 static std::unique_ptr<V8StackTraceImpl> capture(V8DebuggerAgentImpl*, size_
t maxStackSize, const String16& description = String16()); | 49 static std::unique_ptr<V8StackTraceImpl> capture(V8DebuggerAgentImpl*, size_
t maxStackSize, const String16& description = String16()); |
49 | 50 |
50 std::unique_ptr<V8StackTrace> clone() override; | 51 std::unique_ptr<V8StackTrace> clone() override; |
51 std::unique_ptr<V8StackTraceImpl> cloneImpl(); | 52 std::unique_ptr<V8StackTraceImpl> cloneImpl(); |
| 53 std::unique_ptr<V8StackTrace> isolatedCopy() override; |
| 54 std::unique_ptr<V8StackTraceImpl> isolatedCopyImpl(); |
52 std::unique_ptr<protocol::Runtime::StackTrace> buildInspectorObjectForTail(V
8DebuggerAgentImpl*) const; | 55 std::unique_ptr<protocol::Runtime::StackTrace> buildInspectorObjectForTail(V
8DebuggerAgentImpl*) const; |
53 ~V8StackTraceImpl() override; | 56 ~V8StackTraceImpl() override; |
54 | 57 |
55 // V8StackTrace implementation. | 58 // V8StackTrace implementation. |
56 bool isEmpty() const override { return !m_frames.size(); }; | 59 bool isEmpty() const override { return !m_frames.size(); }; |
57 String16 topSourceURL() const override; | 60 String16 topSourceURL() const override; |
58 int topLineNumber() const override; | 61 int topLineNumber() const override; |
59 int topColumnNumber() const override; | 62 int topColumnNumber() const override; |
60 String16 topScriptId() const override; | 63 String16 topScriptId() const override; |
61 String16 topFunctionName() const override; | 64 String16 topFunctionName() const override; |
62 std::unique_ptr<protocol::Runtime::StackTrace> buildInspectorObject() const
override; | 65 std::unique_ptr<protocol::Runtime::StackTrace> buildInspectorObject() const
override; |
63 String16 toString() const override; | 66 String16 toString() const override; |
64 | 67 |
65 private: | 68 private: |
66 V8StackTraceImpl(const String16& description, protocol::Vector<Frame>& frame
s, std::unique_ptr<V8StackTraceImpl> parent); | 69 V8StackTraceImpl(const String16& description, protocol::Vector<Frame>& frame
s, std::unique_ptr<V8StackTraceImpl> parent); |
67 | 70 |
68 String16 m_description; | 71 String16 m_description; |
69 protocol::Vector<Frame> m_frames; | 72 protocol::Vector<Frame> m_frames; |
70 std::unique_ptr<V8StackTraceImpl> m_parent; | 73 std::unique_ptr<V8StackTraceImpl> m_parent; |
71 }; | 74 }; |
72 | 75 |
73 } // namespace blink | 76 } // namespace blink |
74 | 77 |
75 #endif // V8StackTraceImpl_h | 78 #endif // V8StackTraceImpl_h |
OLD | NEW |