Skip to content

Commit

Permalink
src: replace usage of deprecated GetDebugContext
Browse files Browse the repository at this point in the history
PR-URL: #5159
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
  • Loading branch information
targos authored and Ali Sheikh committed Mar 4, 2016
1 parent 4417f99 commit d515a3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/debug-agent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ void Agent::Enable() {

// Assign environment to the debugger's context
// NOTE: The debugger context is created after `SetMessageHandler()` call
parent_env()->AssignToContext(v8::Debug::GetDebugContext());
auto debug_context = v8::Debug::GetDebugContext(parent_env()->isolate());
parent_env()->AssignToContext(debug_context);
}


Expand Down
4 changes: 2 additions & 2 deletions src/node_contextify.cc
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,12 @@ class ContextifyContext {
Local<String> script_source(args[0]->ToString(args.GetIsolate()));
if (script_source.IsEmpty())
return; // Exception pending.
Local<Context> debug_context = Debug::GetDebugContext();
Local<Context> debug_context = Debug::GetDebugContext(args.GetIsolate());
Environment* env = Environment::GetCurrent(args);
if (debug_context.IsEmpty()) {
// Force-load the debug context.
Debug::GetMirror(args.GetIsolate()->GetCurrentContext(), args[0]);
debug_context = Debug::GetDebugContext();
debug_context = Debug::GetDebugContext(args.GetIsolate());
CHECK(!debug_context.IsEmpty());
// Ensure that the debug context has an Environment assigned in case
// a fatal error is raised. The fatal exception handler in node.cc
Expand Down

0 comments on commit d515a3f

Please sign in to comment.