Bug 916115: In StickyScrollContainer::UpdatePositions, put do_QueryFrame result in a local var before comparing it for equality. r=corey
authorDaniel Holbert <dholbert@cs.stanford.edu>
Fri, 13 Sep 2013 10:04:23 -0700
changeset 147052 b2bb76571aa1851b2409ae5b0960991b94e501b5
parent 147051 41c637af7de9669ffa191aa7afb1e51a3edeaa55
child 147053 0d4a80f8e1df270e1919402ae4657075fd50f752
push id25283
push userryanvm@gmail.com
push dateFri, 13 Sep 2013 20:07:11 +0000
treeherdermozilla-central@7dbdc0fbda87 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscorey
bugs916115
milestone26.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 916115: In StickyScrollContainer::UpdatePositions, put do_QueryFrame result in a local var before comparing it for equality. r=corey
layout/generic/StickyScrollContainer.cpp
--- a/layout/generic/StickyScrollContainer.cpp
+++ b/layout/generic/StickyScrollContainer.cpp
@@ -254,18 +254,23 @@ StickyScrollContainer::GetScrollRanges(n
     aOuter->SetRightEdge(contain.XMost() - stick.x);
   }
 }
 
 void
 StickyScrollContainer::UpdatePositions(nsPoint aScrollPosition,
                                        nsIFrame* aSubtreeRoot)
 {
-  NS_ASSERTION(!aSubtreeRoot || aSubtreeRoot == do_QueryFrame(mScrollFrame),
-    "If reflowing, should be reflowing the scroll frame");
+#ifdef DEBUG
+  {
+    nsIFrame* scrollFrameAsFrame = do_QueryFrame(mScrollFrame);
+    NS_ASSERTION(!aSubtreeRoot || aSubtreeRoot == scrollFrameAsFrame,
+                 "If reflowing, should be reflowing the scroll frame");
+  }
+#endif
   mScrollPosition = aScrollPosition;
 
   OverflowChangedTracker oct;
   oct.SetSubtreeRoot(aSubtreeRoot);
   for (nsTArray<nsIFrame*>::size_type i = 0; i < mFrames.Length(); i++) {
     nsIFrame* f = mFrames[i];
     if (aSubtreeRoot) {
       // Reflowing the scroll frame, so recompute offsets.