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

Commit b88e848

Browse files
hashseedbbondy
authored andcommitted
src: remove usage of deprecated debug API
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]>
1 parent a19de0f commit b88e848

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/node_contextify.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,8 @@ class ContextifyContext {
252252
Environment* env = Environment::GetCurrent(args);
253253
if (debug_context.IsEmpty()) {
254254
// Force-load the debug context.
255-
Debug::GetMirror(args.GetIsolate()->GetCurrentContext(), args[0]);
255+
auto dummy_event_listener = [] (const Debug::EventDetails&) {};
256+
Debug::SetDebugEventListener(args.GetIsolate(), dummy_event_listener);
256257
debug_context = Debug::GetDebugContext(args.GetIsolate());
257258
CHECK(!debug_context.IsEmpty());
258259
// Ensure that the debug context has an Environment assigned in case

0 commit comments

Comments
 (0)