diff --git a/src/node_contextify.cc b/src/node_contextify.cc index d74b01ea0da371..8e4114170dd4d5 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -244,6 +244,9 @@ class ContextifyContext { } + static void DummyDebugEventListener(const Debug::EventDetails&) {} + + static void RunInDebugContext(const FunctionCallbackInfo& args) { Local script_source(args[0]->ToString(args.GetIsolate())); if (script_source.IsEmpty()) @@ -252,7 +255,7 @@ class ContextifyContext { Environment* env = Environment::GetCurrent(args); if (debug_context.IsEmpty()) { // Force-load the debug context. - Debug::GetMirror(args.GetIsolate()->GetCurrentContext(), args[0]); + Debug::SetDebugEventListener(args.GetIsolate(), DummyDebugEventListener); debug_context = Debug::GetDebugContext(args.GetIsolate()); CHECK(!debug_context.IsEmpty()); // Ensure that the debug context has an Environment assigned in case