Bug 1837226 part 3: Make nsBaseWidget::SwipeFinished destroy its SwipeTracker before clearing pointer. r=hiro

This new call should generally be a no-op, since we already un-register before
we get here, i.e. before we call SwipeFinished on the widget. This new call is
just to be extra-sure we're unregistered.  With this change, nsBaseWidget is
now consistent about calling Destroy before clearing its mSwipeTracker pointer.

Depends on D180240

Differential Revision: https://phabricator.services.mozilla.com/D180241
This commit is contained in:
Daniel Holbert 2023-06-07 22:02:30 +00:00
Родитель f82eb9e9ec
Коммит d8ca619c81
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -2229,7 +2229,10 @@ nsresult nsBaseWidget::AsyncEnableDragDrop(bool aEnable) {
kAsyncDragDropTimeout, EventQueuePriority::Idle);
}
void nsBaseWidget::SwipeFinished() { mSwipeTracker = nullptr; }
void nsBaseWidget::SwipeFinished() {
mSwipeTracker->Destroy();
mSwipeTracker = nullptr;
}
void nsBaseWidget::ReportSwipeStarted(uint64_t aInputBlockId,
bool aStartSwipe) {