| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index c5344bd151a6f205c656e633611b3b68c09cb2f9..16f5ea638ba84b41fc504e5b8ea04a084d279d3c 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -8836,9 +8836,9 @@ MaybeLocal<Array> Debug::GetInternalProperties(Isolate* v8_isolate,
|
| return Utils::ToLocal(result);
|
| }
|
|
|
| -bool DebugInterface::SetDebugEventListener(Isolate* isolate,
|
| - DebugInterface::EventCallback that,
|
| - Local<Value> data) {
|
| +bool debug::DebugInterface::SetDebugEventListener(
|
| + Isolate* isolate, debug::DebugInterface::EventCallback that,
|
| + Local<Value> data) {
|
| i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
|
| ENTER_V8(i_isolate);
|
| i::HandleScope scope(i_isolate);
|
| @@ -8850,35 +8850,35 @@ bool DebugInterface::SetDebugEventListener(Isolate* isolate,
|
| return true;
|
| }
|
|
|
| -Local<Context> DebugInterface::GetDebugContext(Isolate* isolate) {
|
| +Local<Context> debug::DebugInterface::GetDebugContext(Isolate* isolate) {
|
| return Debug::GetDebugContext(isolate);
|
| }
|
|
|
| -MaybeLocal<Value> DebugInterface::Call(Local<Context> context,
|
| - v8::Local<v8::Function> fun,
|
| - v8::Local<v8::Value> data) {
|
| +MaybeLocal<Value> debug::DebugInterface::Call(Local<Context> context,
|
| + v8::Local<v8::Function> fun,
|
| + v8::Local<v8::Value> data) {
|
| return Debug::Call(context, fun, data);
|
| }
|
|
|
| -void DebugInterface::SetLiveEditEnabled(Isolate* isolate, bool enable) {
|
| +void debug::DebugInterface::SetLiveEditEnabled(Isolate* isolate, bool enable) {
|
| Debug::SetLiveEditEnabled(isolate, enable);
|
| }
|
|
|
| -void DebugInterface::DebugBreak(Isolate* isolate) {
|
| +void debug::DebugInterface::DebugBreak(Isolate* isolate) {
|
| Debug::DebugBreak(isolate);
|
| }
|
|
|
| -void DebugInterface::CancelDebugBreak(Isolate* isolate) {
|
| +void debug::DebugInterface::CancelDebugBreak(Isolate* isolate) {
|
| Debug::CancelDebugBreak(isolate);
|
| }
|
|
|
| -MaybeLocal<Array> DebugInterface::GetInternalProperties(Isolate* isolate,
|
| - Local<Value> value) {
|
| +MaybeLocal<Array> debug::DebugInterface::GetInternalProperties(
|
| + Isolate* isolate, Local<Value> value) {
|
| return Debug::GetInternalProperties(isolate, value);
|
| }
|
|
|
| -void DebugInterface::ChangeBreakOnException(Isolate* isolate,
|
| - ExceptionBreakState type) {
|
| +void debug::DebugInterface::ChangeBreakOnException(Isolate* isolate,
|
| + ExceptionBreakState type) {
|
| i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate);
|
| internal_isolate->debug()->ChangeBreakOnException(
|
| i::BreakException, type == BreakOnAnyException);
|
| @@ -8886,7 +8886,8 @@ void DebugInterface::ChangeBreakOnException(Isolate* isolate,
|
| type != NoBreakOnException);
|
| }
|
|
|
| -void DebugInterface::PrepareStep(Isolate* v8_isolate, StepAction action) {
|
| +void debug::DebugInterface::PrepareStep(Isolate* v8_isolate,
|
| + StepAction action) {
|
| i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
|
| ENTER_V8(isolate);
|
| CHECK(isolate->debug()->CheckExecutionState());
|
| @@ -8896,37 +8897,37 @@ void DebugInterface::PrepareStep(Isolate* v8_isolate, StepAction action) {
|
| isolate->debug()->PrepareStep(static_cast<i::StepAction>(action));
|
| }
|
|
|
| -void DebugInterface::ClearStepping(Isolate* v8_isolate) {
|
| +void debug::DebugInterface::ClearStepping(Isolate* v8_isolate) {
|
| i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
|
| ENTER_V8(isolate);
|
| // Clear all current stepping setup.
|
| isolate->debug()->ClearStepping();
|
| }
|
|
|
| -v8::Isolate* DebugInterface::Script::GetIsolate() const {
|
| +v8::Isolate* debug::Script::GetIsolate() const {
|
| return reinterpret_cast<v8::Isolate*>(Utils::OpenHandle(this)->GetIsolate());
|
| }
|
|
|
| -ScriptOriginOptions DebugInterface::Script::OriginOptions() const {
|
| +ScriptOriginOptions debug::Script::OriginOptions() const {
|
| return Utils::OpenHandle(this)->origin_options();
|
| }
|
|
|
| -bool DebugInterface::Script::WasCompiled() const {
|
| +bool debug::Script::WasCompiled() const {
|
| return Utils::OpenHandle(this)->compilation_state() ==
|
| i::Script::COMPILATION_STATE_COMPILED;
|
| }
|
|
|
| -int DebugInterface::Script::Id() const { return Utils::OpenHandle(this)->id(); }
|
| +int debug::Script::Id() const { return Utils::OpenHandle(this)->id(); }
|
|
|
| -int DebugInterface::Script::LineOffset() const {
|
| +int debug::Script::LineOffset() const {
|
| return Utils::OpenHandle(this)->line_offset();
|
| }
|
|
|
| -int DebugInterface::Script::ColumnOffset() const {
|
| +int debug::Script::ColumnOffset() const {
|
| return Utils::OpenHandle(this)->column_offset();
|
| }
|
|
|
| -std::vector<int> DebugInterface::Script::LineEnds() const {
|
| +std::vector<int> debug::Script::LineEnds() const {
|
| i::Handle<i::Script> script = Utils::OpenHandle(this);
|
| if (script->type() == i::Script::TYPE_WASM) return std::vector<int>();
|
| i::Isolate* isolate = script->GetIsolate();
|
| @@ -8942,7 +8943,7 @@ std::vector<int> DebugInterface::Script::LineEnds() const {
|
| return result;
|
| }
|
|
|
| -MaybeLocal<String> DebugInterface::Script::Name() const {
|
| +MaybeLocal<String> debug::Script::Name() const {
|
| i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
|
| i::HandleScope handle_scope(isolate);
|
| i::Handle<i::Script> script = Utils::OpenHandle(this);
|
| @@ -8952,7 +8953,7 @@ MaybeLocal<String> DebugInterface::Script::Name() const {
|
| handle_scope.CloseAndEscape(i::Handle<i::String>::cast(value)));
|
| }
|
|
|
| -MaybeLocal<String> DebugInterface::Script::SourceURL() const {
|
| +MaybeLocal<String> debug::Script::SourceURL() const {
|
| i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
|
| i::HandleScope handle_scope(isolate);
|
| i::Handle<i::Script> script = Utils::OpenHandle(this);
|
| @@ -8962,7 +8963,7 @@ MaybeLocal<String> DebugInterface::Script::SourceURL() const {
|
| handle_scope.CloseAndEscape(i::Handle<i::String>::cast(value)));
|
| }
|
|
|
| -MaybeLocal<String> DebugInterface::Script::SourceMappingURL() const {
|
| +MaybeLocal<String> debug::Script::SourceMappingURL() const {
|
| i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
|
| i::HandleScope handle_scope(isolate);
|
| i::Handle<i::Script> script = Utils::OpenHandle(this);
|
| @@ -8972,7 +8973,7 @@ MaybeLocal<String> DebugInterface::Script::SourceMappingURL() const {
|
| handle_scope.CloseAndEscape(i::Handle<i::String>::cast(value)));
|
| }
|
|
|
| -MaybeLocal<String> DebugInterface::Script::ContextData() const {
|
| +MaybeLocal<String> debug::Script::ContextData() const {
|
| i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
|
| i::HandleScope handle_scope(isolate);
|
| i::Handle<i::Script> script = Utils::OpenHandle(this);
|
| @@ -8982,7 +8983,7 @@ MaybeLocal<String> DebugInterface::Script::ContextData() const {
|
| handle_scope.CloseAndEscape(i::Handle<i::String>::cast(value)));
|
| }
|
|
|
| -MaybeLocal<String> DebugInterface::Script::Source() const {
|
| +MaybeLocal<String> debug::Script::Source() const {
|
| i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
|
| i::HandleScope handle_scope(isolate);
|
| i::Handle<i::Script> script = Utils::OpenHandle(this);
|
| @@ -8992,7 +8993,7 @@ MaybeLocal<String> DebugInterface::Script::Source() const {
|
| handle_scope.CloseAndEscape(i::Handle<i::String>::cast(value)));
|
| }
|
|
|
| -bool DebugInterface::Script::IsWasm() const {
|
| +bool debug::Script::IsWasm() const {
|
| return Utils::OpenHandle(this)->type() == i::Script::TYPE_WASM;
|
| }
|
|
|
| @@ -9002,7 +9003,7 @@ int GetSmiValue(i::Handle<i::FixedArray> array, int index) {
|
| }
|
| } // namespace
|
|
|
| -bool DebugInterface::Script::GetPossibleBreakpoints(
|
| +bool debug::Script::GetPossibleBreakpoints(
|
| const debug::Location& start, const debug::Location& end,
|
| std::vector<debug::Location>* locations) const {
|
| CHECK(!start.IsEmpty());
|
| @@ -9054,8 +9055,7 @@ bool DebugInterface::Script::GetPossibleBreakpoints(
|
| return true;
|
| }
|
|
|
| -int DebugInterface::Script::GetSourcePosition(
|
| - const debug::Location& location) const {
|
| +int debug::Script::GetSourcePosition(const debug::Location& location) const {
|
| i::Handle<i::Script> script = Utils::OpenHandle(this);
|
| if (script->type() == i::Script::TYPE_WASM) {
|
| // TODO(clemensh): Return the proper thing for wasm.
|
| @@ -9081,8 +9081,8 @@ int DebugInterface::Script::GetSourcePosition(
|
| return std::min(prev_line_offset + column + 1, line_offset);
|
| }
|
|
|
| -MaybeLocal<DebugInterface::Script> DebugInterface::Script::Wrap(
|
| - v8::Isolate* v8_isolate, v8::Local<v8::Object> script) {
|
| +MaybeLocal<debug::Script> debug::Script::Wrap(v8::Isolate* v8_isolate,
|
| + v8::Local<v8::Object> script) {
|
| i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
|
| ENTER_V8(isolate);
|
| i::HandleScope handle_scope(isolate);
|
| @@ -9098,8 +9098,7 @@ MaybeLocal<DebugInterface::Script> DebugInterface::Script::Wrap(
|
| script_obj->type() != i::Script::TYPE_WASM) {
|
| return MaybeLocal<Script>();
|
| }
|
| - return ToApiHandle<DebugInterface::Script>(
|
| - handle_scope.CloseAndEscape(script_obj));
|
| + return ToApiHandle<debug::Script>(handle_scope.CloseAndEscape(script_obj));
|
| }
|
|
|
| debug::Location::Location(int line_number, int column_number)
|
| @@ -9124,9 +9123,8 @@ bool debug::Location::IsEmpty() const {
|
| return line_number_ == -1 && column_number_ == -1;
|
| }
|
|
|
| -void DebugInterface::GetLoadedScripts(
|
| - v8::Isolate* v8_isolate,
|
| - PersistentValueVector<DebugInterface::Script>& scripts) {
|
| +void debug::DebugInterface::GetLoadedScripts(
|
| + v8::Isolate* v8_isolate, PersistentValueVector<debug::Script>& scripts) {
|
| i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
|
| ENTER_V8(isolate);
|
| // TODO(kozyatinskiy): remove this GC once tests are dealt with.
|
| @@ -9147,7 +9145,7 @@ void DebugInterface::GetLoadedScripts(
|
| }
|
| }
|
|
|
| -debug::WasmDisassembly DebugInterface::DisassembleWasmFunction(
|
| +debug::WasmDisassembly debug::DebugInterface::DisassembleWasmFunction(
|
| Isolate* v8_isolate, Local<Object> v8_script, int function_index) {
|
| i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
|
| if (v8_script.IsEmpty()) return {};
|
| @@ -9163,7 +9161,7 @@ debug::WasmDisassembly DebugInterface::DisassembleWasmFunction(
|
| return compiled_module->DisassembleFunction(function_index);
|
| }
|
|
|
| -MaybeLocal<UnboundScript> DebugInterface::CompileInspectorScript(
|
| +MaybeLocal<UnboundScript> debug::DebugInterface::CompileInspectorScript(
|
| Isolate* v8_isolate, Local<String> source) {
|
| i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
|
| PREPARE_FOR_DEBUG_INTERFACE_EXECUTION_WITH_ISOLATE(isolate, UnboundScript);
|
|
|