File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,8 @@ void Agent::Enable() {
124124
125125 // Assign environment to the debugger's context
126126 // NOTE: The debugger context is created after `SetMessageHandler()` call
127- parent_env ()->AssignToContext (v8::Debug::GetDebugContext ());
127+ auto debug_context = v8::Debug::GetDebugContext (parent_env ()->isolate ());
128+ parent_env ()->AssignToContext (debug_context);
128129}
129130
130131
Original file line number Diff line number Diff line change @@ -243,12 +243,12 @@ class ContextifyContext {
243243 Local<String> script_source (args[0 ]->ToString (args.GetIsolate ()));
244244 if (script_source.IsEmpty ())
245245 return ; // Exception pending.
246- Local<Context> debug_context = Debug::GetDebugContext ();
246+ Local<Context> debug_context = Debug::GetDebugContext (args. GetIsolate () );
247247 Environment* env = Environment::GetCurrent (args);
248248 if (debug_context.IsEmpty ()) {
249249 // Force-load the debug context.
250250 Debug::GetMirror (args.GetIsolate ()->GetCurrentContext (), args[0 ]);
251- debug_context = Debug::GetDebugContext ();
251+ debug_context = Debug::GetDebugContext (args. GetIsolate () );
252252 CHECK (!debug_context.IsEmpty ());
253253 // Ensure that the debug context has an Environment assigned in case
254254 // a fatal error is raised. The fatal exception handler in node.cc
You can’t perform that action at this time.
0 commit comments