diff --git a/patches/node/fix_expose_internalcallbackscope.patch b/patches/node/fix_expose_internalcallbackscope.patch index c16a957c342e4..8d3092394aab4 100644 --- a/patches/node/fix_expose_internalcallbackscope.patch +++ b/patches/node/fix_expose_internalcallbackscope.patch @@ -3,7 +3,7 @@ From: deepak1556 Date: Sat, 6 Jan 2018 18:28:10 +0530 Subject: fix: expose InternalCallbackScope -This commit exposes InternalCallbackScope in order to allow us access to kAllowEmptyResource for usage https://github.com/electron/electron/blob/master/atom/common/api/atom_bindings.cc\#L108. We should look to accomplish this another way so we no longer need to do this, as in verbose mode the regular CallBack Scope doesn't swallow errors and so we can otherwise use it. +This commit exposes InternalCallbackScope in order to allow us access to its internal flags. diff --git a/src/node_internals.h b/src/node_internals.h index 7ec3eac697e4b7d6160da59df709f416814e1f73..c362485dca561ed4a5210d7ac9f0e3b2a36a8d0c 100644 diff --git a/shell/app/node_main.cc b/shell/app/node_main.cc index 2e42ee18e99c6..dfeabf2430dce 100644 --- a/shell/app/node_main.cc +++ b/shell/app/node_main.cc @@ -251,9 +251,8 @@ int NodeMain(int argc, char* argv[]) { { v8::HandleScope scope(isolate); node::InternalCallbackScope callback_scope( - env, v8::Local(), {1, 0}, - node::InternalCallbackScope::kAllowEmptyResource | - node::InternalCallbackScope::kSkipAsyncHooks); + env, v8::Object::New(isolate), {1, 0}, + node::InternalCallbackScope::kSkipAsyncHooks); node::LoadEnvironment(env); } diff --git a/shell/common/api/electron_bindings.cc b/shell/common/api/electron_bindings.cc index 9f43a874a3527..4c00a6d78bacb 100644 --- a/shell/common/api/electron_bindings.cc +++ b/shell/common/api/electron_bindings.cc @@ -132,9 +132,9 @@ void ElectronBindings::OnCallNextTick(uv_async_t* handle) { node::Environment* env = *it; gin_helper::Locker locker(env->isolate()); v8::Context::Scope context_scope(env->context()); - node::InternalCallbackScope scope( - env, v8::Local(), {0, 0}, - node::InternalCallbackScope::kAllowEmptyResource); + node::InternalCallbackScope scope(env, v8::Object::New(env->isolate()), + {0, 0}, + node::InternalCallbackScope::kNoFlags); } self->pending_next_ticks_.clear();