Bug 1461979 - change faulty assert to warning r=dholbert draft
authorMorgan Rae Reschenberg <mreschenberg@berkeley.edu>
Mon, 21 May 2018 15:35:31 -0700
changeset 797882 0147a6e3932abc1d672bb269b3a0b56a62302104
parent 797745 77c06979d9e88979ec96263eccdbd750cb9221a4
push id110617
push userbmo:mreschenberg@berkeley.edu
push dateMon, 21 May 2018 22:43:24 +0000
reviewersdholbert
bugs1461979
milestone62.0a1
Bug 1461979 - change faulty assert to warning r=dholbert MozReview-Commit-ID: 1cFN6Hk2Bdj
layout/generic/ReflowInput.cpp
layout/generic/crashtests/1461979-1.html
layout/generic/crashtests/crashtests.list
--- a/layout/generic/ReflowInput.cpp
+++ b/layout/generic/ReflowInput.cpp
@@ -1587,18 +1587,18 @@ ReflowInput::CalculateHypotheticalPositi
 void
 ReflowInput::InitAbsoluteConstraints(nsPresContext* aPresContext,
                                      const ReflowInput* aReflowInput,
                                      const LogicalSize& aCBSize,
                                      LayoutFrameType aFrameType)
 {
   WritingMode wm = GetWritingMode();
   WritingMode cbwm = aReflowInput->GetWritingMode();
-  MOZ_ASSERT(aCBSize.BSize(cbwm) != NS_AUTOHEIGHT,
-             "containing block bsize must be constrained");
+  NS_WARNING_ASSERTION(aCBSize.BSize(cbwm) != NS_AUTOHEIGHT,
+                       "containing block bsize must be constrained");
 
   NS_ASSERTION(aFrameType != LayoutFrameType::Table,
                "InitAbsoluteConstraints should not be called on table frames");
   NS_ASSERTION(mFrame->GetStateBits() & NS_FRAME_OUT_OF_FLOW,
                "Why are we here?");
 
   const auto& styleOffset = mStylePosition->mOffset;
   bool iStartIsAuto = styleOffset.GetIStartUnit(cbwm) == eStyleUnit_Auto;
new file mode 100644
--- /dev/null
+++ b/layout/generic/crashtests/1461979-1.html
@@ -0,0 +1,13 @@
+<html>
+    <head>
+       <script>
+            function start () {
+                try { o1 = document.createElementNS('http://www.w3.org/2000/svg', 'style') } catch (e) {}
+                try { document.head.appendChild(o1) } catch (e) {}
+                try { o1.sheet.insertRule('* { padding-top:calc(439804in) }', 0) } catch (e) {}
+                try { o1.sheet.insertRule('* { position:absolute}', 0) } catch (e) {}
+            }
+            window.addEventListener('load', start)
+        </script>
+    </head>
+</html>
\ No newline at end of file
--- a/layout/generic/crashtests/crashtests.list
+++ b/layout/generic/crashtests/crashtests.list
@@ -682,8 +682,9 @@ load 1427824.html
 load 1431781.html
 load 1431781-2.html
 asserts(6) load 1458028.html # bug 847368
 load 1459697.html
 load 1460158-1.html
 load 1460158-2.html
 load 1460158-3.html
 load 1461039.html
+load 1461979-1.html