Merge pull request #4998 from atom/node-5.10.0

Upgrade Node to v5.10.0
This commit is contained in:
Cheng Zhao 2016-04-03 16:53:11 +09:00
commit d62d8bbf0a
3 changed files with 14 additions and 2 deletions

View file

@ -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<v8::Object> 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();

View file

@ -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);

2
vendor/node vendored

@ -1 +1 @@
Subproject commit d8e7d3e76cb3c6e709449d181ddc2af8c4859303
Subproject commit 95e76436b3aceff54ebf8b32282cdbf8c74c4a5a