!9081 修复未开jit时应用逃生问题

Merge pull request !9081 from Yiwei/escape
This commit is contained in:
openharmony_ci 2024-09-04 05:22:38 +00:00 committed by Gitee
commit a30e2b97c1
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -19,6 +19,7 @@
#include "ecmascript/platform/aot_crash_info.h" #include "ecmascript/platform/aot_crash_info.h"
#include "ecmascript/platform/os.h" #include "ecmascript/platform/os.h"
#include "ecmascript/stubs/runtime_stubs-inl.h" #include "ecmascript/stubs/runtime_stubs-inl.h"
#include "ecmascript/jit/jit.h"
#if defined(PANDA_TARGET_OHOS) #if defined(PANDA_TARGET_OHOS)
#include "ecmascript/extractortool/src/extractor.h" #include "ecmascript/extractortool/src/extractor.h"
#endif #endif
@ -251,7 +252,7 @@ void JsStackInfo::BuildCrashInfo(bool isJsCrash, uintptr_t pc, JSThread *thread)
if (JsStackInfo::loader == nullptr || JsStackInfo::options == nullptr) { if (JsStackInfo::loader == nullptr || JsStackInfo::options == nullptr) {
return; return;
} }
if (!JsStackInfo::loader->IsEnableAOT() && !thread->GetEcmaVM()->IsEnableFastJit() && if (!JsStackInfo::loader->IsEnableAOT() && !Jit::GetInstance()->IsEnableFastJit() &&
!JsStackInfo::options->IsEnablePGOProfiler()) { !JsStackInfo::options->IsEnablePGOProfiler()) {
return; return;
} }
@ -264,7 +265,7 @@ void JsStackInfo::BuildCrashInfo(bool isJsCrash, uintptr_t pc, JSThread *thread)
type = ohos::RuntimeInfoType::OTHERS; type = ohos::RuntimeInfoType::OTHERS;
} }
ohos::AotRuntimeInfo::GetInstance().BuildCrashRuntimeInfo(type); ohos::AotRuntimeInfo::GetInstance().BuildCrashRuntimeInfo(type);
if (isJsCrash) { if (isJsCrash && thread != nullptr) {
DumpJitCode(thread); DumpJitCode(thread);
} }
} }