From ff718b19db10105e1e0687f77b156445e444fd93 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 25 Jan 2017 09:24:24 -0800 Subject: [PATCH] Upgrade node for new 7.4 patches and changes --- atom/common/node_bindings.cc | 10 +++++++--- vendor/node | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/atom/common/node_bindings.cc b/atom/common/node_bindings.cc index 25734cb0038e..0737314d07f1 100644 --- a/atom/common/node_bindings.cc +++ b/atom/common/node_bindings.cc @@ -163,9 +163,13 @@ node::Environment* NodeBindings::CreateEnvironment( new node::IsolateData(context->GetIsolate(), uv_default_loop()), context, args.size(), c_argv.get(), 0, nullptr); - // Node uses the deprecated SetAutorunMicrotasks(false) mode, we should switch - // to use the scoped policy to match blink's behavior. - if (!is_browser_) { + if (is_browser_) { + // SetAutorunMicrotasks is no longer called in node::CreateEnvironment + // so instead call it here to match expected node behavior + context->GetIsolate()->SetMicrotasksPolicy(v8::MicrotasksPolicy::kExplicit); + } else { + // Node uses the deprecated SetAutorunMicrotasks(false) mode, we should + // switch to use the scoped policy to match blink's behavior. context->GetIsolate()->SetMicrotasksPolicy(v8::MicrotasksPolicy::kScoped); } diff --git a/vendor/node b/vendor/node index d4eba08b3ccd..494083b74094 160000 --- a/vendor/node +++ b/vendor/node @@ -1 +1 @@ -Subproject commit d4eba08b3ccd8f1e1045ad129384b18beb38b697 +Subproject commit 494083b740949caa93aca64ce75fe75c31e2034e