Fix loop mode of ark native engine

Signed-off-by: zhangyukun <zhangyukun8@huawei.com>
This commit is contained in:
zhangyukun8 2021-09-16 11:25:38 +00:00 committed by Gitee
parent 21d9600da4
commit 49c72991c2

View File

@ -2640,7 +2640,7 @@ bool JsiEngine::Initialize(const RefPtr<FrontendDelegate>& delegate)
nativeEngine_ = new ArkNativeEngine(const_cast<EcmaVM*>(vm), static_cast<void*>(this));
ACE_DCHECK(delegate);
delegate->AddTaskObserver([nativeEngine = nativeEngine_](){
nativeEngine->Loop(LOOP_DEFAULT);
nativeEngine->Loop(LOOP_NOWAIT);
});
return true;