Bug 1349650 - [css-grid] Fix a bogus assertion. r=dholbert a=NPOTB
authorMats Palmgren <mats@mozilla.com>
Thu, 23 Mar 2017 21:04:36 +0100
changeset 377184 27126f140a2cf381f070afe905cf03659be8cd98
parent 377183 db91f4e6e0a88c46f6dc02ffe31a933f5fe538bb
child 377185 5ec9b3104a4cc38b1d28e6f49f0c0dc61642314e
push id7161
push userdholbert@mozilla.com
push dateWed, 05 Apr 2017 23:25:40 +0000
treeherdermozilla-beta@5ec9b3104a4c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert, NPOTB
bugs1349650
milestone53.0
Bug 1349650 - [css-grid] Fix a bogus assertion. r=dholbert a=NPOTB When mArray is used it contains all grid container children, including placeholders. aGridItemCount always excludes placeholders. MozReview-Commit-ID: 2RVFOdVvTq
layout/generic/nsGridContainerFrame.cpp
--- a/layout/generic/nsGridContainerFrame.cpp
+++ b/layout/generic/nsGridContainerFrame.cpp
@@ -465,17 +465,17 @@ public:
     MOZ_ASSERT(IsForward() || mGridItemIndex < *mGridItemCount,
                "Returning an out-of-range mGridItemIndex...");
     return mGridItemIndex;
   }
 
   void SetGridItemCount(size_t aGridItemCount)
   {
 #ifndef CLANG_CRASH_BUG
-    MOZ_ASSERT(mIter.isSome() || mArray->Length() == aGridItemCount,
+    MOZ_ASSERT(mIter.isSome() || aGridItemCount <= mArray->Length(),
                "grid item count mismatch");
 #endif
     mGridItemCount.emplace(aGridItemCount);
     // Note: it's OK if mGridItemIndex underflows -- GridItemIndex()
     // will not be called unless there is at least one item.
     mGridItemIndex = IsForward() ? 0 : *mGridItemCount - 1;
   }