Skip to content
This repository has been archived by the owner on May 31, 2019. It is now read-only.

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 <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 bbondy committed Apr 9, 2017
1 parent a19de0f commit b88e848
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 @@ -252,7 +252,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 b88e848

Please sign in to comment.