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: #11437
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
  • Loading branch information
hashseed authored and addaleax committed Feb 22, 2017
1 parent c942e20 commit 539e83a
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 539e83a

Please sign in to comment.