From 1445ea8bafd4b165d286bbe6a68e397400159270 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 3 Aug 2016 17:57:10 +0900 Subject: [PATCH] Revert Node's call of SetAutorunMicrotasks(false) --- atom/common/node_bindings.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/atom/common/node_bindings.cc b/atom/common/node_bindings.cc index 2a999ea79b..a388d1a5f7 100644 --- a/atom/common/node_bindings.cc +++ b/atom/common/node_bindings.cc @@ -173,6 +173,11 @@ node::Environment* NodeBindings::CreateEnvironment( context->GetIsolate(), uv_default_loop(), context, args.size(), c_argv.get(), 0, nullptr); + // Node turns off AutorunMicrotasks, but we need it in web pages to match the + // behavior of Chrome. + if (!is_browser_) + context->GetIsolate()->SetAutorunMicrotasks(true); + mate::Dictionary process(context->GetIsolate(), env->process_object()); process.Set("type", process_type); process.Set("resourcesPath", resources_path);