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

Side by Side Diff: src/debug/debug-interface.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/debug/debug.cc ('k') | src/inspector/DEPS » ('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_DEBUG_DEBUG_INTERFACE_H_ 5 #ifndef V8_DEBUG_DEBUG_INTERFACE_H_
6 #define V8_DEBUG_DEBUG_INTERFACE_H_ 6 #define V8_DEBUG_DEBUG_INTERFACE_H_
7 7
8 #include <functional> 8 #include <functional>
9 9
10 #include "include/v8-debug.h" 10 #include "include/v8-debug.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 * Defines if VM will pause on exceptions or not. 79 * Defines if VM will pause on exceptions or not.
80 * If BreakOnAnyExceptions is set then VM will pause on caught and uncaught 80 * If BreakOnAnyExceptions is set then VM will pause on caught and uncaught
81 * exception, if BreakOnUncaughtException is set then VM will pause only on 81 * exception, if BreakOnUncaughtException is set then VM will pause only on
82 * uncaught exception, otherwise VM won't stop on any exception. 82 * uncaught exception, otherwise VM won't stop on any exception.
83 */ 83 */
84 void ChangeBreakOnException(Isolate* isolate, ExceptionBreakState state); 84 void ChangeBreakOnException(Isolate* isolate, ExceptionBreakState state);
85 85
86 enum StepAction { 86 enum StepAction {
87 StepOut = 0, // Step out of the current function. 87 StepOut = 0, // Step out of the current function.
88 StepNext = 1, // Step to the next statement in the current function. 88 StepNext = 1, // Step to the next statement in the current function.
89 StepIn = 2, // Step into new functions invoked or the next statement 89 StepIn = 2 // Step into new functions invoked or the next statement
90 // in the current function. 90 // in the current function.
91 StepFrame = 3 // Step into a new frame or return to previous frame.
92 }; 91 };
93 92
94 void PrepareStep(Isolate* isolate, StepAction action); 93 void PrepareStep(Isolate* isolate, StepAction action);
95 void ClearStepping(Isolate* isolate); 94
95 bool HasNonBlackboxedFrameOnStack(Isolate* isolate);
96 96
97 /** 97 /**
98 * Out-of-memory callback function. 98 * Out-of-memory callback function.
99 * The function is invoked when the heap size is close to the hard limit. 99 * The function is invoked when the heap size is close to the hard limit.
100 * 100 *
101 * \param data the parameter provided during callback installation. 101 * \param data the parameter provided during callback installation.
102 */ 102 */
103 typedef void (*OutOfMemoryCallback)(void* data); 103 typedef void (*OutOfMemoryCallback)(void* data);
104 void SetOutOfMemoryCallback(Isolate* isolate, OutOfMemoryCallback callback, 104 void SetOutOfMemoryCallback(Isolate* isolate, OutOfMemoryCallback callback,
105 void* data); 105 void* data);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 int NumImportedFunctions() const; 140 int NumImportedFunctions() const;
141 141
142 debug::WasmDisassembly DisassembleFunction(int function_index) const; 142 debug::WasmDisassembly DisassembleFunction(int function_index) const;
143 }; 143 };
144 144
145 void GetLoadedScripts(Isolate* isolate, PersistentValueVector<Script>& scripts); 145 void GetLoadedScripts(Isolate* isolate, PersistentValueVector<Script>& scripts);
146 146
147 MaybeLocal<UnboundScript> CompileInspectorScript(Isolate* isolate, 147 MaybeLocal<UnboundScript> CompileInspectorScript(Isolate* isolate,
148 Local<String> source); 148 Local<String> source);
149 149
150 class DebugEventListener { 150 class DebugDelegate {
151 public: 151 public:
152 virtual ~DebugEventListener() {} 152 virtual ~DebugDelegate() {}
153 virtual void PromiseEventOccurred(debug::PromiseDebugActionType type, 153 virtual void PromiseEventOccurred(debug::PromiseDebugActionType type,
154 int id) {} 154 int id) {}
155 virtual void ScriptCompiled(v8::Local<Script> script, 155 virtual void ScriptCompiled(v8::Local<Script> script,
156 bool has_compile_error) {} 156 bool has_compile_error) {}
157 virtual void BreakProgramRequested(v8::Local<v8::Context> paused_context, 157 virtual void BreakProgramRequested(v8::Local<v8::Context> paused_context,
158 v8::Local<v8::Object> exec_state, 158 v8::Local<v8::Object> exec_state,
159 v8::Local<v8::Value> break_points_hit) {} 159 v8::Local<v8::Value> break_points_hit) {}
160 virtual void ExceptionThrown(v8::Local<v8::Context> paused_context, 160 virtual void ExceptionThrown(v8::Local<v8::Context> paused_context,
161 v8::Local<v8::Object> exec_state, 161 v8::Local<v8::Object> exec_state,
162 v8::Local<v8::Value> exception, 162 v8::Local<v8::Value> exception,
163 bool is_promise_rejection, bool is_uncaught) {} 163 bool is_promise_rejection, bool is_uncaught) {}
164 virtual bool IsFunctionBlackboxed(v8::Local<debug::Script> script,
165 const debug::Location& start,
166 const debug::Location& end) {
167 return false;
168 }
164 }; 169 };
165 170
166 void SetDebugEventListener(Isolate* isolate, DebugEventListener* listener); 171 void SetDebugDelegate(Isolate* isolate, DebugDelegate* listener);
172
173 void ResetBlackboxedStateCache(Isolate* isolate,
174 v8::Local<debug::Script> script);
167 175
168 } // namespace debug 176 } // namespace debug
169 } // namespace v8 177 } // namespace v8
170 178
171 #endif // V8_DEBUG_DEBUG_INTERFACE_H_ 179 #endif // V8_DEBUG_DEBUG_INTERFACE_H_
OLDNEW
« no previous file with comments | « src/debug/debug.cc ('k') | src/inspector/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698