Skip to content

Commit 8ca88c5

Browse files
hashseedjasnell
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 <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>
1 parent 170cb3c commit 8ca88c5

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)