diff --git a/runtime/ecma_vm.cpp b/runtime/ecma_vm.cpp index 969c9c3ba46548c47ccfcb250c2a96781760c7a7..ffe2ea6df241e937e6b6c509e0b182cc9003825f 100644 --- a/runtime/ecma_vm.cpp +++ b/runtime/ecma_vm.cpp @@ -85,7 +85,7 @@ JSRuntimeOptions EcmaVM::options_; // NOLINT(fuchsia-statically-constructed-obj void EcmaRendezvous::SafepointBegin() { - ASSERT(!Locks::mutator_lock->HasLock()); + ASSERT(!GetMutatorLock()->HasLock()); LOG(DEBUG, GC) << "Rendezvous: SafepointBegin"; Thread *current = Thread::GetCurrent(); ManagedThread *main_thread = current->GetVM()->GetAssociatedThread(); @@ -94,15 +94,15 @@ void EcmaRendezvous::SafepointBegin() main_thread->SuspendImpl(true); } // Acquire write MutatorLock - Locks::mutator_lock->WriteLock(); + GetMutatorLock()->WriteLock(); } void EcmaRendezvous::SafepointEnd() { - ASSERT(Locks::mutator_lock->HasLock()); + ASSERT(GetMutatorLock()->HasLock()); LOG(DEBUG, GC) << "Rendezvous: SafepointEnd"; // Release write MutatorLock - Locks::mutator_lock->Unlock(); + GetMutatorLock()->Unlock(); Thread *current = Thread::GetCurrent(); ManagedThread *main_thread = current->GetVM()->GetAssociatedThread(); if (current != main_thread) { @@ -190,7 +190,7 @@ EcmaVM::EcmaVM(JSRuntimeOptions options) options_ = std::move(options); icEnable_ = options_.IsIcEnable(); optionalLogEnabled_ = options_.IsEnableOptionalLog(); - rendezvous_ = chunk_.New(); + rendezvous_ = chunk_.New(this); snapshotSerializeEnable_ = options_.IsSnapshotSerializeEnabled(); if (!snapshotSerializeEnable_) { snapshotDeserializeEnable_ = options_.IsSnapshotDeserializeEnabled(); diff --git a/runtime/ecma_vm.h b/runtime/ecma_vm.h index f44fcf5d414a2a68b49c4432c412936a57c34e64..ab2f47a8d0477030767a7ebf1930e9d85313e71f 100644 --- a/runtime/ecma_vm.h +++ b/runtime/ecma_vm.h @@ -82,8 +82,11 @@ using HostPromiseRejectionTracker = void (*)(const EcmaVM *vm, const JSHandle