Bug 1563163 Part 2: Downgrade an assert to a warning in nsFlexContainerFrame::GetFlexFrameWithComputedInfo. r=mats
authorBrad Werth <bwerth@mozilla.com>
Fri, 30 Aug 2019 23:16:44 +0000
changeset 554730 776f100fead626a135489e8a5373b237c1691c2f
parent 554729 5119f09d6b99ac8b9f27ee676e8dc7acdfb02815
child 554731 2d621070f778e4998b7efab944e4e9fb45e84862
push id2165
push userffxbld-merge
push dateMon, 14 Oct 2019 16:30:58 +0000
treeherdermozilla-release@0eae18af659f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmats
bugs1563163
milestone70.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 1563163 Part 2: Downgrade an assert to a warning in nsFlexContainerFrame::GetFlexFrameWithComputedInfo. r=mats Differential Revision: https://phabricator.services.mozilla.com/D44284
layout/generic/nsFlexContainerFrame.cpp
layout/generic/nsFlexContainerFrame.h
--- a/layout/generic/nsFlexContainerFrame.cpp
+++ b/layout/generic/nsFlexContainerFrame.cpp
@@ -4498,19 +4498,20 @@ nsFlexContainerFrame* nsFlexContainerFra
       // again. But if the weakFrameRef is no longer valid, then we
       // must bail out.
       if (!weakFrameRef.IsAlive()) {
         return nullptr;
       }
 
       flexFrame = GetFlexContainerFrame(weakFrameRef.GetFrame());
 
-      MOZ_ASSERT(!flexFrame || flexFrame->HasProperty(FlexContainerInfo()),
-                 "The state bit should've made our forced-reflow "
-                 "generate a FlexContainerInfo object");
+      NS_WARNING_ASSERTION(
+          !flexFrame || flexFrame->HasProperty(FlexContainerInfo()),
+          "The state bit should've made our forced-reflow "
+          "generate a FlexContainerInfo object");
     }
   }
   return flexFrame;
 }
 
 /* static */
 bool nsFlexContainerFrame::IsItemInlineAxisMainAxis(nsIFrame* aFrame) {
   MOZ_ASSERT(aFrame && aFrame->IsFlexItem(), "expecting arg to be a flex item");
--- a/layout/generic/nsFlexContainerFrame.h
+++ b/layout/generic/nsFlexContainerFrame.h
@@ -189,17 +189,20 @@ class nsFlexContainerFrame final : publi
                                       ComputedFlexContainerInfo)
   /**
    * This function should only be called on a nsFlexContainerFrame
    * that has just been returned by a call to
    * GetFlexFrameWithComputedInfo.
    */
   const ComputedFlexContainerInfo* GetFlexContainerInfo() {
     const ComputedFlexContainerInfo* info = GetProperty(FlexContainerInfo());
-    MOZ_ASSERT(info, "Property generation wasn't requested.");
+    NS_WARNING_ASSERTION(info,
+                         "Property generation wasn't requested. "
+                         "This is a known issue in Print Preview. "
+                         "See Bug 1157012.");
     return info;
   }
 
   /**
    * Return aFrame as a flex frame after ensuring it has computed flex info.
    * @return nullptr if aFrame is null or doesn't have a flex frame
    *         as its content insertion frame.
    * @note this might destroy layout/style data since it may flush layout.