Skip to content

Commit e7a8909

Browse files
committed
src: lock the isolate properly in IsolateData destructor
nodejs/node#57031
1 parent b903b67 commit e7a8909

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

patches/node/refactor_attach_cppgc_heap_on_v8_isolate_creation.patch

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,13 @@ index 1c1062a3996f2bb7de9e91f7f4385c8f8d20f490..b0156ee26c29ebe5b79c97834f3bfe8b
6565
{
6666
// GC could still be run after the IsolateData is destroyed, so we store
6767
// the ids in a static map to ensure pointers to them are still valid
68-
@@ -605,14 +597,6 @@ IsolateData::IsolateData(Isolate* isolate,
68+
@@ -605,14 +597,5 @@ IsolateData::IsolateData(Isolate* isolate,
6969
}
7070
}
7171

7272
-IsolateData::~IsolateData() {
7373
- if (cpp_heap_ != nullptr) {
74+
- v8::Locker locker(isolate_);
7475
- // The CppHeap must be detached before being terminated.
7576
- isolate_->DetachCppHeap();
7677
- cpp_heap_->Terminate();

0 commit comments

Comments
 (0)