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_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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
139 | 139 |
140 int NumFunctions() const; | 140 int NumFunctions() const; |
141 int NumImportedFunctions() const; | 141 int NumImportedFunctions() const; |
142 | 142 |
143 std::pair<int, int> GetFunctionRange(int function_index) const; | 143 std::pair<int, int> GetFunctionRange(int function_index) const; |
144 | 144 |
145 debug::WasmDisassembly DisassembleFunction(int function_index) const; | 145 debug::WasmDisassembly DisassembleFunction(int function_index) const; |
146 }; | 146 }; |
147 | 147 |
148 void GetLoadedScripts(Isolate* isolate, PersistentValueVector<Script>& scripts); | 148 void GetLoadedScripts(Isolate* isolate, PersistentValueVector<Script>& scripts); |
149 void ReportExistingModules(Isolate* isolate); | |
neis
2017/02/01 13:38:55
Please add a comment describing what this does, as
kozy
2017/02/01 16:39:25
Done.
| |
149 | 150 |
150 MaybeLocal<UnboundScript> CompileInspectorScript(Isolate* isolate, | 151 MaybeLocal<UnboundScript> CompileInspectorScript(Isolate* isolate, |
151 Local<String> source); | 152 Local<String> source); |
152 | 153 |
153 class DebugDelegate { | 154 class DebugDelegate { |
154 public: | 155 public: |
155 virtual ~DebugDelegate() {} | 156 virtual ~DebugDelegate() {} |
156 virtual void PromiseEventOccurred(debug::PromiseDebugActionType type, int id, | 157 virtual void PromiseEventOccurred(debug::PromiseDebugActionType type, int id, |
157 int parent_id) {} | 158 int parent_id) {} |
158 virtual void ScriptCompiled(v8::Local<Script> script, | 159 virtual void ScriptCompiled(v8::Local<Script> script, |
159 bool has_compile_error) {} | 160 bool has_compile_error) {} |
160 virtual void BreakProgramRequested(v8::Local<v8::Context> paused_context, | 161 virtual void BreakProgramRequested(v8::Local<v8::Context> paused_context, |
161 v8::Local<v8::Object> exec_state, | 162 v8::Local<v8::Object> exec_state, |
162 v8::Local<v8::Value> break_points_hit) {} | 163 v8::Local<v8::Value> break_points_hit) {} |
163 virtual void ExceptionThrown(v8::Local<v8::Context> paused_context, | 164 virtual void ExceptionThrown(v8::Local<v8::Context> paused_context, |
164 v8::Local<v8::Object> exec_state, | 165 v8::Local<v8::Object> exec_state, |
165 v8::Local<v8::Value> exception, | 166 v8::Local<v8::Value> exception, |
166 bool is_promise_rejection, bool is_uncaught) {} | 167 bool is_promise_rejection, bool is_uncaught) {} |
167 virtual bool IsFunctionBlackboxed(v8::Local<debug::Script> script, | 168 virtual bool IsFunctionBlackboxed(v8::Local<debug::Script> script, |
168 const debug::Location& start, | 169 const debug::Location& start, |
169 const debug::Location& end) { | 170 const debug::Location& end) { |
170 return false; | 171 return false; |
171 } | 172 } |
173 virtual void ModuleResolved(v8::Local<debug::Script> referer, | |
174 v8::Local<debug::Script> requested, | |
175 v8::Local<v8::String> specifier) {} | |
172 }; | 176 }; |
173 | 177 |
174 void SetDebugDelegate(Isolate* isolate, DebugDelegate* listener); | 178 void SetDebugDelegate(Isolate* isolate, DebugDelegate* listener); |
175 | 179 |
176 void ResetBlackboxedStateCache(Isolate* isolate, | 180 void ResetBlackboxedStateCache(Isolate* isolate, |
177 v8::Local<debug::Script> script); | 181 v8::Local<debug::Script> script); |
178 | 182 |
179 int EstimatedValueSize(Isolate* isolate, v8::Local<v8::Value> value); | 183 int EstimatedValueSize(Isolate* isolate, v8::Local<v8::Value> value); |
180 | 184 |
181 } // namespace debug | 185 } // namespace debug |
182 } // namespace v8 | 186 } // namespace v8 |
183 | 187 |
184 #endif // V8_DEBUG_DEBUG_INTERFACE_H_ | 188 #endif // V8_DEBUG_DEBUG_INTERFACE_H_ |
OLD | NEW |