Browse Source

Upgrade node for new 7.4 patches and changes

Kevin Sawicki 8 years ago
parent
commit
ff718b19db
2 changed files with 8 additions and 4 deletions
  1. 7 3
      atom/common/node_bindings.cc
  2. 1 1
      vendor/node

+ 7 - 3
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);
   }
 

+ 1 - 1
vendor/node

@@ -1 +1 @@
-Subproject commit d4eba08b3ccd8f1e1045ad129384b18beb38b697
+Subproject commit 494083b740949caa93aca64ce75fe75c31e2034e