From d085b57931ca8a2be57a8c046507583989e2c8ca Mon Sep 17 00:00:00 2001 From: Ishin Pavel Date: Mon, 7 Nov 2022 16:26:47 +0300 Subject: [PATCH] Add ScopedMutatorLock in GetGlobalVarAddress Signed-off-by: Ishin Pavel --- runtime/compiler/ecmascript_runtime_interface.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/runtime/compiler/ecmascript_runtime_interface.cpp b/runtime/compiler/ecmascript_runtime_interface.cpp index 7e2e913ac..6b0c61291 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); -- Gitee