Bug 1247050 - Avoid tripping an NS_ASSERTION that can legitimately fire. r=mstange
authorKartikaya Gupta <kgupta@mozilla.com>
Wed, 15 Jun 2016 01:27:21 +0100
changeset 301829 ae0c2fe7d0c35eab0c27c5bbb84da649aaddec26
parent 301828 f40b29f8d6840f960984ee89f1aa7a49a566b8fc
child 301830 4258cf59c62f03401834d1febb546fd8148667d1
push id78467
push userkgupta@mozilla.com
push dateWed, 15 Jun 2016 08:30:24 +0000
treeherdermozilla-inbound@ae0c2fe7d0c3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1247050
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1247050 - Avoid tripping an NS_ASSERTION that can legitimately fire. r=mstange MozReview-Commit-ID: JpfBWiP3BeL
layout/generic/ScrollbarActivity.cpp
--- a/layout/generic/ScrollbarActivity.cpp
+++ b/layout/generic/ScrollbarActivity.cpp
@@ -80,17 +80,22 @@ ScrollbarActivity::ActivityStarted()
 
   NS_ASSERTION(mIsActive, "need to be active during activity");
   NS_ASSERTION(!mIsFading, "must not be fading during activity");
 }
 
 void
 ScrollbarActivity::ActivityStopped()
 {
-  NS_ASSERTION(IsActivityOngoing(), "activity stopped while none was going on");
+  if (!IsActivityOngoing()) {
+    // This can happen if there was a frame reconstruction while the activity
+    // was ongoing. In this case we just do nothing. We should probably handle
+    // this case better.
+    return;
+  }
   NS_ASSERTION(mIsActive, "need to be active during activity");
   NS_ASSERTION(!mIsFading, "must not be fading during ongoing activity");
 
   mNestedActivityCounter--;
 
   if (!IsActivityOngoing()) {
     StartFadeBeginTimer();