Skip to content

Commit

Permalink
Bug 1855289 - Do not start delayed clear active state timer if it is …
Browse files Browse the repository at this point in the history
…null. r=botond

If the delayed clear active state timer is null, do not attempt to start
the timer. In the case that the delayed clear active state timer is
null, the active state should be cleared on ProcessSingleTap().

Differential Revision: https://phabricator.services.mozilla.com/D189380
  • Loading branch information
dlrobertson committed Sep 27, 2023
1 parent cdbfa14 commit a4a35c5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gfx/layers/apz/util/ActiveElementManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ NS_IMETHODIMP DelayedClearElementActivation::GetName(nsACString& aName) {

void DelayedClearElementActivation::StartTimer() {
MOZ_ASSERT(mTimer);
// If the timer is null, active content state has already been cleared.
if (!mTimer) {
return;
}
nsresult rv = mTimer->InitWithCallback(
this, StaticPrefs::ui_touch_activation_duration_ms(),
nsITimer::TYPE_ONE_SHOT);
Expand Down

0 comments on commit a4a35c5

Please sign in to comment.