diff --git a/runtime/compiler/ecmascript_runtime_interface.cpp b/runtime/compiler/ecmascript_runtime_interface.cpp index 7e2e913acb25f1597131bbf1ab92567913943218..6b0c61291df706678ec492dee8d1b139b644278e 100644 --- a/runtime/compiler/ecmascript_runtime_interface.cpp +++ b/runtime/compiler/ecmascript_runtime_interface.cpp @@ -62,6 +62,9 @@ uintptr_t EcmaRuntimeInterface::GetGlobalVarAddress(MethodPtr method, size_t id) if (thread == nullptr || !thread->IsThreadAlive()) { return 0; } + + ScopedMutatorLock lock; + auto panda_file = JsMethodCast(method)->GetPandaFile(); JSTaggedValue constant_pool(JSTaggedValue::VALUE_HOLE);