Bug 1038294 part 3 - Remove UNREACHABLE_FCDATA. r=emilio
authorMats Palmgren <mats@mozilla.com>
Wed, 14 Aug 2019 14:32:38 +0000
changeset 487931 fd0c240fd715787b73d3f91403dc11f05c771383
parent 487930 a101b9693ad64ea0eea298f8c2fb43cbb97a7e5b
child 487932 f3c8731da1e5b13bae45667e083c9e793740b0d9
push id36433
push userbtara@mozilla.com
push dateWed, 14 Aug 2019 21:57:52 +0000
treeherdermozilla-central@7d9a2196d313 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio
bugs1038294
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 1038294 part 3 - Remove UNREACHABLE_FCDATA. r=emilio Differential Revision: https://phabricator.services.mozilla.com/D39755
layout/base/nsCSSFrameConstructor.cpp
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -326,20 +326,16 @@ static inline nsContainerFrame* GetField
 #define FCDATA_DECL(_flags, _func) \
   { _flags, {(FrameCreationFunc)_func}, nullptr, PseudoStyleType::NotPseudo }
 #define FCDATA_WITH_WRAPPING_BLOCK(_flags, _func, _anon_box) \
   {                                                          \
     _flags | FCDATA_CREATE_BLOCK_WRAPPER_FOR_ALL_KIDS,       \
         {(FrameCreationFunc)_func}, nullptr, _anon_box       \
   }
 
-#define UNREACHABLE_FCDATA() \
-  { 0, {(FrameCreationFunc) nullptr}, nullptr, PseudoStyleType::NotPseudo }
-//----------------------------------------------------------------------
-
 /**
  * True if aFrame is an actual inline frame in the sense of non-replaced
  * display:inline CSS boxes.  In other words, it can be affected by {ib}
  * splitting and can contain first-letter frames.  Basically, this is either an
  * inline frame (positioned or otherwise) or an line frame (this last because
  * it can contain first-letter and because inserting blocks in the middle of it
  * needs to terminate it).
  */
@@ -4460,27 +4456,27 @@ nsCSSFrameConstructor::FindDisplayData(c
       static const FrameConstructionData sNonScrollableGridData =
           FCDATA_DECL(0, NS_NewGridContainerFrame);
       return &sNonScrollableGridData;
     }
   }
 
   auto DisplayData = [](StyleDisplay aDisplay) -> const FrameConstructionData* {
     switch (aDisplay) {
+#ifdef DEBUG
       case StyleDisplay::None:
       case StyleDisplay::Block:
       case StyleDisplay::InlineBlock:
       case StyleDisplay::ListItem:
       case StyleDisplay::TableCaption:
       case StyleDisplay::FlowRoot:
-      case StyleDisplay::Contents: {
-        static const FrameConstructionData data =
-          UNREACHABLE_FCDATA();
-        return &data;
-      }
+      case StyleDisplay::Contents:
+        MOZ_ASSERT_UNREACHABLE("should have been handled earlier");
+        return nullptr;
+#endif
       case StyleDisplay::Inline: {
         static const FrameConstructionData data =
           FULL_CTOR_FCDATA(FCDATA_IS_INLINE | FCDATA_IS_LINE_PARTICIPANT,
                            &nsCSSFrameConstructor::ConstructInline);
         return &data;
       }
       case StyleDisplay::Table:
       case StyleDisplay::InlineTable: {