@@ -520,7 +520,6 @@ void IsolateData::CreateProperties() {
520520 CreateEnvProxyTemplate (this );
521521}
522522
523- constexpr uint16_t kDefaultCppGCEmebdderID = 0x90de ;
524523Mutex IsolateData::isolate_data_mutex_;
525524std::unordered_map<uint16_t , std::unique_ptr<PerIsolateWrapperData>>
526525 IsolateData::wrapper_data_map_;
@@ -540,11 +539,11 @@ IsolateData::IsolateData(Isolate* isolate,
540539 new PerIsolateOptions (*(per_process::cli_options->per_isolate )));
541540 v8::CppHeap* cpp_heap = isolate->GetCppHeap ();
542541
543- uint16_t cppgc_id = kDefaultCppGCEmebdderID ;
542+ uint16_t cppgc_id = BaseObject:: kDefaultCppGCEmebdderTypeID ;
544543 if (cpp_heap != nullptr ) {
545544 // The general convention of the wrappable layout for cppgc in the
546545 // ecosystem is:
547- // [ 0 ] -> embedder id
546+ // [ 0 ] -> embedder type id
548547 // [ 1 ] -> wrappable instance
549548 // If the Isolate includes a CppHeap attached by another embedder,
550549 // And if they also use the field 0 for the ID, we DCHECK that
@@ -559,14 +558,6 @@ IsolateData::IsolateData(Isolate* isolate,
559558 // for embedder ID, V8 could accidentally enable cppgc on them. So
560559 // safe guard against this.
561560 DCHECK_NE (descriptor.wrappable_type_index , BaseObject::kSlot );
562- } else {
563- cpp_heap_ = CppHeap::Create (
564- platform,
565- CppHeapCreateParams{
566- {},
567- WrapperDescriptor (
568- BaseObject::kEmbedderType , BaseObject::kSlot , cppgc_id)});
569- isolate->AttachCppHeap (cpp_heap_.get ());
570561 }
571562 // We do not care about overflow since we just want this to be different
572563 // from the cppgc id.
@@ -594,14 +585,6 @@ IsolateData::IsolateData(Isolate* isolate,
594585 }
595586}
596587
597- IsolateData::~IsolateData () {
598- if (cpp_heap_ != nullptr ) {
599- // The CppHeap must be detached before being terminated.
600- isolate_->DetachCppHeap ();
601- cpp_heap_->Terminate ();
602- }
603- }
604-
605588// Public API
606589void SetCppgcReference (Isolate* isolate,
607590 Local<Object> object,
0 commit comments