From 39a20ea4fbd592c8903ee9e93a2245889b6f3fac Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sun, 3 Apr 2016 15:05:47 +0900 Subject: [PATCH] Upgrade Node to v5.10.0 --- atom/common/api/atom_bindings.cc | 11 ++++++++++- atom/common/node_bindings.cc | 3 +++ vendor/node | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/atom/common/api/atom_bindings.cc b/atom/common/api/atom_bindings.cc index fe53d8793f2a..f518caf5c503 100644 --- a/atom/common/api/atom_bindings.cc +++ b/atom/common/api/atom_bindings.cc @@ -98,8 +98,17 @@ void AtomBindings::OnCallNextTick(uv_async_t* handle) { self->pending_next_ticks_.begin(); it != self->pending_next_ticks_.end(); ++it) { node::Environment* env = *it; + // KickNextTick, copied from node.cc: node::Environment::AsyncCallbackScope callback_scope(env); - env->KickNextTick(&callback_scope); + if (callback_scope.in_makecallback()) + continue; + node::Environment::TickInfo* tick_info = env->tick_info(); + if (tick_info->length() == 0) + env->isolate()->RunMicrotasks(); + v8::Local process = env->process_object(); + if (tick_info->length() == 0) + tick_info->set_index(0); + env->tick_callback_function()->Call(process, 0, nullptr).IsEmpty(); } self->pending_next_ticks_.clear(); diff --git a/atom/common/node_bindings.cc b/atom/common/node_bindings.cc index ce3b9a708152..86fb3a6d03a3 100644 --- a/atom/common/node_bindings.cc +++ b/atom/common/node_bindings.cc @@ -175,6 +175,9 @@ node::Environment* NodeBindings::CreateEnvironment( mate::Dictionary process(context->GetIsolate(), env->process_object()); process.Set("type", process_type); process.Set("resourcesPath", resources_path); + // Do not set DOM globals for renderer process. + if (!is_browser_) + process.Set("_noBrowserGlobals", resources_path); // The path to helper app. base::FilePath helper_exec_path; PathService::Get(content::CHILD_PROCESS_EXE, &helper_exec_path); diff --git a/vendor/node b/vendor/node index d8e7d3e76cb3..95e76436b3ac 160000 --- a/vendor/node +++ b/vendor/node @@ -1 +1 @@ -Subproject commit d8e7d3e76cb3c6e709449d181ddc2af8c4859303 +Subproject commit 95e76436b3aceff54ebf8b32282cdbf8c74c4a5a