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: https://github.com/nodejs/node/pull/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>
This commit is contained in:
parent
8fc362ea98
commit
99b75fae10
@ -261,7 +261,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
|
||||
|
Loading…
x
Reference in New Issue
Block a user