src: use non-deprecated V8 microtasks API

SetAutorunMicrotasks is deprecated and a warning will be emitted
starting from V8 6.5. Use the non-deprecated SetMicrotasksPolicy API
instead.

PR-URL: https://github.com/nodejs/node/pull/18753
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Yang Guo <yangguo@chromium.org>
This commit is contained in:
Michaël Zasso 2018-02-13 09:23:49 +01:00
parent faeee11c1f
commit a16081cbad

View File

@ -4421,7 +4421,7 @@ inline int Start(uv_loop_t* event_loop,
isolate->AddMessageListener(OnMessage);
isolate->SetAbortOnUncaughtExceptionCallback(ShouldAbortOnUncaughtException);
isolate->SetAutorunMicrotasks(false);
isolate->SetMicrotasksPolicy(v8::MicrotasksPolicy::kExplicit);
isolate->SetFatalErrorHandler(OnFatalError);
{