Skip to content

Commit 539e83a

Browse files
hashseedaddaleax
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 c942e20 commit 539e83a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/node_contextify.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,8 @@ class ContextifyContext {
261261
Environment* env = Environment::GetCurrent(args);
262262
if (debug_context.IsEmpty()) {
263263
// Force-load the debug context.
264-
Debug::GetMirror(args.GetIsolate()->GetCurrentContext(), args[0]);
264+
auto dummy_event_listener = [] (const Debug::EventDetails&) {};
265+
Debug::SetDebugEventListener(args.GetIsolate(), dummy_event_listener);
265266
debug_context = Debug::GetDebugContext(args.GetIsolate());
266267
CHECK(!debug_context.IsEmpty());
267268
// Ensure that the debug context has an Environment assigned in case

0 commit comments

Comments
 (0)