mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
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:
1 parent
0ddad76813
commit
1dddfeccb2
1 file changed
+2
-1
@@ -254,7 +254,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
|
||||
|
||||
Reference in new issue
Block a user