Bug 1297306 - part7:replace StyleClear related NS_ASSERTION with MOZ_ASSERT. r=xidorn
authorJeremy Chen <jeremychen@mozilla.com>
Wed, 07 Sep 2016 10:20:17 +0800
changeset 312984 5f10d3f47379248797c381742d69af738cf31aad
parent 312983 67f271218828f4a31c69439f52ac3163977cbba7
child 312985 847eab1caa7c8e78fd0e5bdc8ac41a5c13bed299
push id30668
push userkwierso@gmail.com
push dateThu, 08 Sep 2016 00:26:51 +0000
treeherdermozilla-central@7c655e03eef7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersxidorn
bugs1297306
milestone51.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 1297306 - part7:replace StyleClear related NS_ASSERTION with MOZ_ASSERT. r=xidorn MozReview-Commit-ID: Dzd3uOoQCI
layout/generic/nsBlockFrame.cpp
layout/generic/nsLineBox.h
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -4116,18 +4116,18 @@ nsBlockFrame::ReflowInlineFrame(BlockRef
   if (NS_INLINE_IS_BREAK(frameReflowStatus) ||
       StyleClear::None_ != aState.mFloatBreakType) {
     // Always abort the line reflow (because a line break is the
     // minimal amount of break we do).
     *aLineReflowStatus = LINE_REFLOW_STOP;
 
     // XXX what should aLine's break-type be set to in all these cases?
     StyleClear breakType = NS_INLINE_GET_BREAK_TYPE(frameReflowStatus);
-    NS_ASSERTION(StyleClear::None_ != breakType ||
-                 StyleClear::None_ != aState.mFloatBreakType, "bad break type");
+    MOZ_ASSERT(StyleClear::None_ != breakType ||
+               StyleClear::None_ != aState.mFloatBreakType, "bad break type");
 
     if (NS_INLINE_IS_BREAK_BEFORE(frameReflowStatus)) {
       // Break-before cases.
       if (aFrame == aLine->mFirstChild) {
         // If we break before the first frame on the line then we must
         // be trying to place content where there's no room (e.g. on a
         // line with wide floats). Inform the caller to reflow the
         // line after skipping past a float.
--- a/layout/generic/nsLineBox.h
+++ b/layout/generic/nsLineBox.h
@@ -393,33 +393,33 @@ public:
   // Break information is applied *before* the line if the line is a block,
   // or *after* the line if the line is an inline. Confusing, I know, but
   // using different names should help.
   using StyleClear = mozilla::StyleClear;
   bool HasBreakBefore() const {
     return IsBlock() && StyleClear::None_ != BreakType();
   }
   void SetBreakTypeBefore(StyleClear aBreakType) {
-    NS_ASSERTION(IsBlock(), "Only blocks have break-before");
-    NS_ASSERTION(aBreakType == StyleClear::None_ ||
-                 aBreakType == StyleClear::Left ||
-                 aBreakType == StyleClear::Right ||
-                 aBreakType == StyleClear::Both,
-                 "Only float break types are allowed before a line");
+    MOZ_ASSERT(IsBlock(), "Only blocks have break-before");
+    MOZ_ASSERT(aBreakType == StyleClear::None_ ||
+               aBreakType == StyleClear::Left ||
+               aBreakType == StyleClear::Right ||
+               aBreakType == StyleClear::Both,
+               "Only float break types are allowed before a line");
     mFlags.mBreakType = static_cast<int>(aBreakType);
   }
   StyleClear GetBreakTypeBefore() const {
     return IsBlock() ? BreakType() : StyleClear::None_;
   }
 
   bool HasBreakAfter() const {
     return !IsBlock() && StyleClear::None_ != BreakType();
   }
   void SetBreakTypeAfter(StyleClear aBreakType) {
-    NS_ASSERTION(!IsBlock(), "Only inlines have break-after");
+    MOZ_ASSERT(!IsBlock(), "Only inlines have break-after");
     mFlags.mBreakType = static_cast<int>(aBreakType);
   }
   bool HasFloatBreakAfter() const {
     return !IsBlock() &&
            (StyleClear::Left == BreakType() ||
             StyleClear::Right == BreakType() ||
             StyleClear::Both == BreakType());
   }