mirror of
https://github.com/openharmony/ability_ability_runtime.git
synced 2026-08-24 22:21:36 -04:00
add SuspendVM and ResumeVM
issues:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I79K2R Signed-off-by: Rtangyu <rentangyu@huawei.com>
This commit is contained in:
@@ -934,7 +934,13 @@ bool JsRuntime::BuildJsStackInfoList(uint32_t tid, std::vector<JsFrames>& jsFram
|
||||
auto nativeEngine = GetNativeEnginePointer();
|
||||
CHECK_POINTER_AND_RETURN(nativeEngine, false);
|
||||
std::vector<JsFrameInfo> jsFrameInfo;
|
||||
auto arkNativeEngine = static_cast<ArkNativeEngine*>(nativeEngine->GetWorkerVm(nativeEngine, tid));
|
||||
if (arkNativeEngine == nullptr){
|
||||
return false;
|
||||
}
|
||||
arkNativeEngine->SuspendVM();
|
||||
bool ret = nativeEngine->BuildJsStackInfoList(tid, jsFrameInfo);
|
||||
arkNativeEngine->ResumeVM();
|
||||
if (!ret) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user