Skip to content

Commit d515a3f

Browse files
targosAli Sheikh
authored and
Ali Sheikh
committed
src: replace usage of deprecated GetDebugContext
PR-URL: #5159 Reviewed-By: Ben Noordhuis <[email protected]>
1 parent 4417f99 commit d515a3f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/debug-agent.cc

+2-1
Original file line numberDiff line numberDiff 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

src/node_contextify.cc

+2-2
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)