Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(809)

Side by Side Diff: src/inspector/v8-debugger.h

Issue 2633803002: [inspector] implemented blackboxing inside v8 (Closed)
Patch Set: addressed comments Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/inspector/DEPS ('k') | src/inspector/v8-debugger.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_V8DEBUGGER_H_ 5 #ifndef V8_INSPECTOR_V8DEBUGGER_H_
6 #define V8_INSPECTOR_V8DEBUGGER_H_ 6 #define V8_INSPECTOR_V8DEBUGGER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "src/base/macros.h" 10 #include "src/base/macros.h"
11 #include "src/debug/debug-interface.h" 11 #include "src/debug/debug-interface.h"
12 #include "src/inspector/java-script-call-frame.h" 12 #include "src/inspector/java-script-call-frame.h"
13 #include "src/inspector/protocol/Forward.h" 13 #include "src/inspector/protocol/Forward.h"
14 #include "src/inspector/protocol/Runtime.h" 14 #include "src/inspector/protocol/Runtime.h"
15 #include "src/inspector/v8-debugger-script.h" 15 #include "src/inspector/v8-debugger-script.h"
16 #include "src/inspector/wasm-translation.h" 16 #include "src/inspector/wasm-translation.h"
17 17
18 #include "include/v8-inspector.h" 18 #include "include/v8-inspector.h"
19 19
20 namespace v8_inspector { 20 namespace v8_inspector {
21 21
22 struct ScriptBreakpoint; 22 struct ScriptBreakpoint;
23 class V8DebuggerAgentImpl; 23 class V8DebuggerAgentImpl;
24 class V8InspectorImpl; 24 class V8InspectorImpl;
25 class V8StackTraceImpl; 25 class V8StackTraceImpl;
26 26
27 using protocol::Response; 27 using protocol::Response;
28 28
29 class V8Debugger : public v8::debug::DebugEventListener { 29 class V8Debugger : public v8::debug::DebugDelegate {
30 public: 30 public:
31 V8Debugger(v8::Isolate*, V8InspectorImpl*); 31 V8Debugger(v8::Isolate*, V8InspectorImpl*);
32 ~V8Debugger(); 32 ~V8Debugger();
33 33
34 bool enabled() const; 34 bool enabled() const;
35 35
36 String16 setBreakpoint(const ScriptBreakpoint&, int* actualLineNumber, 36 String16 setBreakpoint(const ScriptBreakpoint&, int* actualLineNumber,
37 int* actualColumnNumber); 37 int* actualColumnNumber);
38 void removeBreakpoint(const String16& breakpointId); 38 void removeBreakpoint(const String16& breakpointId);
39 void setBreakpointsActivated(bool); 39 void setBreakpointsActivated(bool);
40 bool breakpointsActivated() const { return m_breakpointsActivated; } 40 bool breakpointsActivated() const { return m_breakpointsActivated; }
41 41
42 v8::debug::ExceptionBreakState getPauseOnExceptionsState(); 42 v8::debug::ExceptionBreakState getPauseOnExceptionsState();
43 void setPauseOnExceptionsState(v8::debug::ExceptionBreakState); 43 void setPauseOnExceptionsState(v8::debug::ExceptionBreakState);
44 void setPauseOnNextStatement(bool); 44 void setPauseOnNextStatement(bool);
45 bool canBreakProgram(); 45 bool canBreakProgram();
46 void breakProgram(); 46 void breakProgram();
47 void continueProgram(); 47 void continueProgram();
48 void stepIntoStatement(); 48 void stepIntoStatement();
49 void stepOverStatement(); 49 void stepOverStatement();
50 void stepOutOfFunction(); 50 void stepOutOfFunction();
51 void clearStepping();
52 51
53 Response setScriptSource( 52 Response setScriptSource(
54 const String16& sourceID, v8::Local<v8::String> newSource, bool dryRun, 53 const String16& sourceID, v8::Local<v8::String> newSource, bool dryRun,
55 protocol::Maybe<protocol::Runtime::ExceptionDetails>*, 54 protocol::Maybe<protocol::Runtime::ExceptionDetails>*,
56 JavaScriptCallFrames* newCallFrames, protocol::Maybe<bool>* stackChanged, 55 JavaScriptCallFrames* newCallFrames, protocol::Maybe<bool>* stackChanged,
57 bool* compileError); 56 bool* compileError);
58 JavaScriptCallFrames currentCallFrames(int limit = 0); 57 JavaScriptCallFrames currentCallFrames(int limit = 0);
59 58
60 // Each script inherits debug data from v8::Context where it has been 59 // Each script inherits debug data from v8::Context where it has been
61 // compiled. 60 // compiled.
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 int id) override; 137 int id) override;
139 void ScriptCompiled(v8::Local<v8::debug::Script> script, 138 void ScriptCompiled(v8::Local<v8::debug::Script> script,
140 bool has_compile_error) override; 139 bool has_compile_error) override;
141 void BreakProgramRequested(v8::Local<v8::Context> paused_context, 140 void BreakProgramRequested(v8::Local<v8::Context> paused_context,
142 v8::Local<v8::Object> exec_state, 141 v8::Local<v8::Object> exec_state,
143 v8::Local<v8::Value> break_points_hit) override; 142 v8::Local<v8::Value> break_points_hit) override;
144 void ExceptionThrown(v8::Local<v8::Context> paused_context, 143 void ExceptionThrown(v8::Local<v8::Context> paused_context,
145 v8::Local<v8::Object> exec_state, 144 v8::Local<v8::Object> exec_state,
146 v8::Local<v8::Value> exception, 145 v8::Local<v8::Value> exception,
147 bool is_promise_rejection, bool is_uncaught) override; 146 bool is_promise_rejection, bool is_uncaught) override;
147 bool IsFunctionBlackboxed(v8::Local<v8::debug::Script> script,
148 const v8::debug::Location& start,
149 const v8::debug::Location& end) override;
148 150
149 v8::Isolate* m_isolate; 151 v8::Isolate* m_isolate;
150 V8InspectorImpl* m_inspector; 152 V8InspectorImpl* m_inspector;
151 int m_enableCount; 153 int m_enableCount;
152 bool m_breakpointsActivated; 154 bool m_breakpointsActivated;
153 v8::Global<v8::Object> m_debuggerScript; 155 v8::Global<v8::Object> m_debuggerScript;
154 v8::Global<v8::Context> m_debuggerContext; 156 v8::Global<v8::Context> m_debuggerContext;
155 v8::Local<v8::Object> m_executionState; 157 v8::Local<v8::Object> m_executionState;
156 v8::Local<v8::Context> m_pausedContext; 158 v8::Local<v8::Context> m_pausedContext;
157 bool m_runningNestedMessageLoop; 159 bool m_runningNestedMessageLoop;
(...skipping 16 matching lines...) Expand all
174 v8::debug::ExceptionBreakState m_pauseOnExceptionsState; 176 v8::debug::ExceptionBreakState m_pauseOnExceptionsState;
175 177
176 WasmTranslation m_wasmTranslation; 178 WasmTranslation m_wasmTranslation;
177 179
178 DISALLOW_COPY_AND_ASSIGN(V8Debugger); 180 DISALLOW_COPY_AND_ASSIGN(V8Debugger);
179 }; 181 };
180 182
181 } // namespace v8_inspector 183 } // namespace v8_inspector
182 184
183 #endif // V8_INSPECTOR_V8DEBUGGER_H_ 185 #endif // V8_INSPECTOR_V8DEBUGGER_H_
OLDNEW
« no previous file with comments | « src/inspector/DEPS ('k') | src/inspector/v8-debugger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698