!35776 修复registerCallback的实例ID获取不到时不执行

Merge pull request !35776 from yihao lin/container
This commit is contained in:
openharmony_ci 2024-06-16 15:06:52 +00:00 committed by Gitee
commit 0b360b6bcc
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1455,7 +1455,7 @@ ArkUINativeModuleValue FrameNodeBridge::RegisterFrameCallback(ArkUIRuntimeCallIn
Local<JSValueRef> firstArg = runtimeCallInfo->GetCallArgRef(0);
CHECK_NULL_RETURN(firstArg->IsFunction(), panda::JSValueRef::Undefined(vm));
auto obj = firstArg->ToObject(vm);
auto containerId = Container::CurrentId();
auto containerId = Container::CurrentIdSafely();
panda::Local<panda::FunctionRef> func = obj;
auto getVsyncFunc = [vm, func = panda::CopyableGlobal(vm, func), containerId]() {
panda::LocalScope pandaScope(vm);