diff options
author | Gus Caplan <me@gus.host> | 2020-05-12 21:26:38 +0300 |
---|---|---|
committer | Gus Caplan <me@gus.host> | 2020-05-14 03:12:11 +0300 |
commit | eaa16cd477f671804a46b57bfdfe918a02334f4d (patch) | |
tree | 1cefef9d2b68fe4fc97361a0d925ddbfff853c64 /src/env.cc | |
parent | fcc183c99413750b1b965e45cb42a1af73da47ab (diff) |
src: remove deprecated FinalizationRegistry hooks
PR-URL: https://github.com/nodejs/node/pull/33373
Fixes: https://github.com/nodejs/node/issues/33389
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Diffstat (limited to 'src/env.cc')
-rw-r--r-- | src/env.cc | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/env.cc b/src/env.cc index 06e6fe6f793..b83bd628351 100644 --- a/src/env.cc +++ b/src/env.cc @@ -31,7 +31,6 @@ using v8::ArrayBuffer; using v8::Boolean; using v8::Context; using v8::EmbedderGraph; -using v8::FinalizationGroup; using v8::Function; using v8::FunctionTemplate; using v8::HandleScope; @@ -523,7 +522,6 @@ void Environment::InitializeLibuv(bool start_profiler_idle_notifier) { [](uv_async_t* async) { Environment* env = ContainerOf( &Environment::task_queues_async_, async); - env->CleanupFinalizationGroups(); env->RunAndClearNativeImmediates(); }); uv_unref(reinterpret_cast<uv_handle_t*>(&idle_prepare_handle_)); @@ -1158,26 +1156,6 @@ void Environment::RunWeakRefCleanup() { isolate()->ClearKeptObjects(); } -void Environment::CleanupFinalizationGroups() { - HandleScope handle_scope(isolate()); - Context::Scope context_scope(context()); - TryCatchScope try_catch(this); - - while (!cleanup_finalization_groups_.empty() && can_call_into_js()) { - Local<FinalizationGroup> fg = - cleanup_finalization_groups_.front().Get(isolate()); - cleanup_finalization_groups_.pop_front(); - if (!FinalizationGroup::Cleanup(fg).FromMaybe(false)) { - if (try_catch.HasCaught() && !try_catch.HasTerminated()) - errors::TriggerUncaughtException(isolate(), try_catch); - // Re-schedule the execution of the remainder of the queue. - CHECK(task_queues_async_initialized_); - uv_async_send(&task_queues_async_); - return; - } - } -} - // Not really any better place than env.cc at this moment. void BaseObject::DeleteMe(void* data) { BaseObject* self = static_cast<BaseObject*>(data); |