mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1837226 part 2: Upgrade some assertions to be release assertions in SwipeTracker.cpp. r=hiro
This patch just strengthens some invariants to be validated in release builds as well. Depends on D180239 Differential Revision: https://phabricator.services.mozilla.com/D180240
This commit is contained in:
parent
6261b69841
commit
f82eb9e9ec
@ -62,8 +62,8 @@ SwipeTracker::SwipeTracker(nsIWidget& aWidget,
|
||||
void SwipeTracker::Destroy() { UnregisterFromRefreshDriver(); }
|
||||
|
||||
SwipeTracker::~SwipeTracker() {
|
||||
MOZ_ASSERT(!mRegisteredWithRefreshDriver,
|
||||
"Destroy needs to be called before deallocating");
|
||||
MOZ_RELEASE_ASSERT(!mRegisteredWithRefreshDriver,
|
||||
"Destroy needs to be called before deallocating");
|
||||
}
|
||||
|
||||
double SwipeTracker::SwipeSuccessTargetValue() const {
|
||||
@ -177,7 +177,8 @@ void SwipeTracker::StartAnimating(double aStartValue, double aTargetValue) {
|
||||
// Add ourselves as a refresh driver observer. The refresh driver
|
||||
// will call WillRefresh for each animation frame until we
|
||||
// unregister ourselves.
|
||||
MOZ_ASSERT(!mRegisteredWithRefreshDriver);
|
||||
MOZ_RELEASE_ASSERT(!mRegisteredWithRefreshDriver,
|
||||
"We only want a single refresh driver registration");
|
||||
if (mRefreshDriver) {
|
||||
mRefreshDriver->AddRefreshObserver(this, FlushType::Style,
|
||||
"Swipe animation");
|
||||
|
Loading…
Reference in New Issue
Block a user