issueNo: I4E2VT

Description: add jerry_acquire_value(vm) for ViewOnSwipeListener constructor
Feature or Bugfix:Bugfix
Binary Source:No

Signed-off-by: youzhi92 <chenyouzhi@huawei.com>
Change-Id: Icef8e2de8a74e4abdaaa806277e29fad0474277f
This commit is contained in:
youzhi92
2021-10-15 17:54:48 +08:00
parent bf8fc3e32e
commit 400a85051e
@@ -151,8 +151,8 @@ public:
return isStopPropagation_;
}
jerry_value_t fn_;
jerry_value_t vm_;
jerry_value_t fn_;
bool isStopPropagation_;
};
@@ -222,7 +222,7 @@ class ViewOnSwipeListener final : public UIView::OnDragListener {
public:
ACE_DISALLOW_COPY_AND_MOVE(ViewOnSwipeListener);
ViewOnSwipeListener(jerry_value_t vm, jerry_value_t fn, bool isStopPropagation)
: vm_(vm), fn_(jerry_acquire_value(fn)), isStopPropagation_(isStopPropagation)
: vm_(jerry_acquire_value(vm)), fn_(jerry_acquire_value(fn)), isStopPropagation_(isStopPropagation)
{
}