From cd8227fb9735b7428c24ec5ec22a2ab1f1f55420 Mon Sep 17 00:00:00 2001 From: Andreas Haas Date: Wed, 5 Mar 2025 14:07:42 +0100 Subject: [PATCH] Delete CppGC teardown code V8 is doing the teardown now, so there is no need for node to do it. --- src/env.cc | 8 -------- src/env.h | 2 -- 2 files changed, 10 deletions(-) diff --git a/src/env.cc b/src/env.cc index 387c9892d01d4f..7d633c06742368 100644 --- a/src/env.cc +++ b/src/env.cc @@ -602,14 +602,6 @@ IsolateData::IsolateData(Isolate* isolate, } } -IsolateData::~IsolateData() { - if (cpp_heap_ != nullptr) { - // The CppHeap must be detached before being terminated. - isolate_->DetachCppHeap(); - cpp_heap_->Terminate(); - } -} - // Deprecated API, embedders should use v8::Object::Wrap() directly instead. void SetCppgcReference(Isolate* isolate, Local object, diff --git a/src/env.h b/src/env.h index 1929450b8fe393..a3147d0d8489c1 100644 --- a/src/env.h +++ b/src/env.h @@ -155,7 +155,6 @@ class NODE_EXTERN_PRIVATE IsolateData : public MemoryRetainer { ArrayBufferAllocator* node_allocator = nullptr, const EmbedderSnapshotData* embedder_snapshot_data = nullptr, std::shared_ptr options = nullptr); - ~IsolateData(); SET_MEMORY_INFO_NAME(IsolateData) SET_SELF_SIZE(IsolateData) @@ -258,7 +257,6 @@ class NODE_EXTERN_PRIVATE IsolateData : public MemoryRetainer { const SnapshotData* snapshot_data_; std::optional snapshot_config_; - std::unique_ptr cpp_heap_; std::shared_ptr options_; worker::Worker* worker_context_ = nullptr; PerIsolateWrapperData* wrapper_data_;