diff options
author | Matteo Collina <hello@matteocollina.com> | 2018-05-04 09:00:07 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2020-02-11 22:59:09 +0300 |
commit | 9fdb6e6aaf45b2364bac89a8f240772f49503ee6 (patch) | |
tree | 6ffbc990c3bdad00c598217cd6a63770a9d1cd3b /src/node_platform.cc | |
parent | 1c11ea43883256b6bc9e64a28bbc22f88c5c2b38 (diff) |
async_hooks: add executionAsyncResource
Remove the need for the destroy hook in the basic APM case.
Co-authored-by: Stephen Belanger <admin@stephenbelanger.com>
PR-URL: https://github.com/nodejs/node/pull/30959
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_platform.cc')
-rw-r--r-- | src/node_platform.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/node_platform.cc b/src/node_platform.cc index b30f907a02d..380a26ecb4b 100644 --- a/src/node_platform.cc +++ b/src/node_platform.cc @@ -10,7 +10,6 @@ namespace node { using v8::Isolate; -using v8::Local; using v8::Object; using v8::Platform; using v8::Task; @@ -388,8 +387,9 @@ void PerIsolatePlatformData::RunForegroundTask(std::unique_ptr<Task> task) { DebugSealHandleScope scope(isolate); Environment* env = Environment::GetCurrent(isolate); if (env != nullptr) { - InternalCallbackScope cb_scope(env, Local<Object>(), { 0, 0 }, - InternalCallbackScope::kAllowEmptyResource); + v8::HandleScope scope(isolate); + InternalCallbackScope cb_scope(env, Object::New(isolate), { 0, 0 }, + InternalCallbackScope::kNoFlags); task->Run(); } else { task->Run(); |