Skip to content

Commit

Permalink
src: remove usage of deprecated debug API
Browse files Browse the repository at this point in the history
Debug::GetMirror is used in contextify to force loading of the debug
context. There is a better way to achieve this.

PR-URL: nodejs/node#11437
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
  • Loading branch information
hashseed authored and targos committed Feb 19, 2017
1 parent 8fc362e commit 99b75fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/node_contextify.cc
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,8 @@ class ContextifyContext {
Environment* env = Environment::GetCurrent(args);
if (debug_context.IsEmpty()) {
// Force-load the debug context.
Debug::GetMirror(args.GetIsolate()->GetCurrentContext(), args[0]);
auto dummy_event_listener = [] (const Debug::EventDetails&) {};
Debug::SetDebugEventListener(args.GetIsolate(), dummy_event_listener);
debug_context = Debug::GetDebugContext(args.GetIsolate());
CHECK(!debug_context.IsEmpty());
// Ensure that the debug context has an Environment assigned in case
Expand Down

0 comments on commit 99b75fa

Please sign in to comment.