!8760 fix looper idle sharedGC deadlock

Merge pull request !8760 from jinjiawei/add_idlegc_jsnapi
This commit is contained in:
openharmony_ci 2024-08-21 02:16:02 +00:00 committed by Gitee
commit 93b2ba8990
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -43,6 +43,7 @@
#include "ecmascript/stubs/runtime_stubs.h"
#include "ecmascript/ohos/jit_tools.h"
#include "ecmascript/ohos/aot_tools.h"
#include "ecmascript/checkpoint/thread_state_transition.h"
#if defined(PANDA_TARGET_OHOS) && !defined(STANDALONE_MODE)
#include "parameters.h"
@ -894,8 +895,9 @@ void EcmaVM::TriggerConcurrentCallback(JSTaggedValue result, JSTaggedValue hint)
void *taskInfo = reinterpret_cast<void*>(thread_->GetTaskInfo());
// clear the taskInfo when return, which can prevent the callback to get it
thread_->SetTaskInfo(reinterpret_cast<uintptr_t>(nullptr));
concurrentCallback_(JSNApiHelper::ToLocal<JSValueRef>(JSHandle<JSTaggedValue>(thread_, result)), success,
taskInfo, concurrentData_);
auto localResultRef = JSNApiHelper::ToLocal<JSValueRef>(JSHandle<JSTaggedValue>(thread_, result));
ThreadNativeScope nativeScope(thread_);
concurrentCallback_(localResultRef, success, taskInfo, concurrentData_);
}
void EcmaVM::DumpCallTimeInfo()