Use InternalCallbackScope for ticking event loop

This commit is contained in:
Cheng Zhao 2018-03-09 14:54:25 +09:00
Родитель 50a5a69c46
Коммит 5d2452608d
3 изменённых файлов: 8 добавлений и 11 удалений

Просмотреть файл

@ -97,16 +97,11 @@ void AtomBindings::OnCallNextTick(uv_async_t* handle) {
for (std::list<node::Environment*>::const_iterator it =
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);
if (callback_scope.in_makecallback())
continue;
node::Environment::TickInfo* tick_info = env->tick_info();
if (!tick_info->has_scheduled())
env->isolate()->RunMicrotasks();
v8::Local<v8::Object> process = env->process_object();
env->tick_callback_function()->Call(process, 0, nullptr).IsEmpty();
node::InternalCallbackScope scope(
*it,
v8::Local<v8::Object>(),
{0, 0},
node::InternalCallbackScope::kAllowEmptyResource);
}
self->pending_next_ticks_.clear();

Просмотреть файл

@ -61,6 +61,7 @@
4055, # 'type cast' : from data pointer 'void *' to function pointer
4057, # 'function' : 'volatile LONG *' differs in indirection to slightly different base types from 'unsigned long *'
4065, # switch statement contains 'default' but no 'case' labels
4129, # unrecognized character escape sequence
4189, #
4131, # uses old-style declarator
4133, # incompatible types
@ -74,6 +75,7 @@
4232, # address of dllimport 'free' is not static, identity not guaranteed
4291, # no matching operator delete found
4295, # array is too small to include a terminating null character
4309, # 'static_cast': truncation of constant value
4311, # 'type cast': pointer truncation from 'void *const ' to 'unsigned long'
4389, # '==' : signed/unsigned mismatch
4456, # declaration of 'm' hides previous local declaration

2
vendor/node поставляемый

@ -1 +1 @@
Subproject commit ac00467c8b6954cbb6b9b64c4643af522a1c207e
Subproject commit 668f3cd06e0b9c24a1aa2d913f22626fff7decd2