Skip to content

Commit 1dddfec

Browse files
hashseedMylesBorins
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: #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 0ddad76 commit 1dddfec

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
@@ -254,7 +254,8 @@ class ContextifyContext {
254254
Environment* env = Environment::GetCurrent(args);
255255
if (debug_context.IsEmpty()) {
256256
// Force-load the debug context.
257-
Debug::GetMirror(args.GetIsolate()->GetCurrentContext(), args[0]);
257+
auto dummy_event_listener = [] (const Debug::EventDetails&) {};
258+
Debug::SetDebugEventListener(args.GetIsolate(), dummy_event_listener);
258259
debug_context = Debug::GetDebugContext(args.GetIsolate());
259260
CHECK(!debug_context.IsEmpty());
260261
// Ensure that the debug context has an Environment assigned in case

0 commit comments

Comments
 (0)