mirror of
https://github.com/openharmony/ace_engine_lite.git
synced 2026-07-21 00:35:30 -04:00
@@ -52,6 +52,7 @@ void CallbackExecutor(void *data)
|
||||
JSValue args[argsLength] = {params->arg};
|
||||
JSRelease(JSFunction::Call(params->fn, params->vm, args, argsLength));
|
||||
JSRelease(params->arg);
|
||||
JSRelease(params->vm);
|
||||
delete params;
|
||||
params = nullptr;
|
||||
}
|
||||
@@ -126,6 +127,7 @@ void EventUtil::InvokeCallback(JSValue vm, JSValue callback, JSValue event, cons
|
||||
HILOG_ERROR(HILOG_MODULE_ACE, "EventUtil::InvokeCallback failed: Async task dispatch failure.");
|
||||
delete params;
|
||||
params = nullptr;
|
||||
JSRelease(vm);
|
||||
JSRelease(event);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,8 +146,8 @@ bool ViewOnSwipeListener::OnDragEnd(UIView& view, const DragEvent &event)
|
||||
HILOG_DEBUG(HILOG_MODULE_ACE, "OnDragEnd received");
|
||||
|
||||
JSValue arg = EventUtil::CreateSwipeEvent(view, event);
|
||||
EventUtil::InvokeCallback(JSUndefined::Create(), fn_, arg, this);
|
||||
|
||||
JSValue vm = GetRootAbilitySlice();
|
||||
EventUtil::InvokeCallback(vm, fn_, arg, this);
|
||||
return isStopPropagation_;
|
||||
}
|
||||
} // namespace ACELite
|
||||
|
||||
@@ -108,7 +108,8 @@ public:
|
||||
return isStopPropagation_;
|
||||
}
|
||||
JSValue arg = EventUtil::CreateEvent(EventUtil::EVENT_CLICK, view, event);
|
||||
EventUtil::InvokeCallback(JSUndefined::Create(), fn_, arg, this);
|
||||
JSValue vm = GetRootAbilitySlice();
|
||||
EventUtil::InvokeCallback(vm, fn_, arg, this);
|
||||
|
||||
return isStopPropagation_;
|
||||
}
|
||||
@@ -143,7 +144,8 @@ public:
|
||||
}
|
||||
|
||||
JSValue arg = EventUtil::CreateEvent(EventUtil::EVENT_LONGPRESS, view, event);
|
||||
EventUtil::InvokeCallback(JSUndefined::Create(), fn_, arg, this);
|
||||
JSValue vm = GetRootAbilitySlice();
|
||||
EventUtil::InvokeCallback(vm, fn_, arg, this);
|
||||
|
||||
return isStopPropagation_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user