Bug 1287743 - Shift an assignment to be outside of an assert, in nsFrameSetFrame, to address a static-analysis issue. r?dholbert draft
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Tue, 19 Jul 2016 21:28:54 +0300
changeset 389592 98dc7b581a1fa5b1e3a888fd469e35513b8c634b
parent 389550 5a91e5b49be3c1ba401b057e90c92d7488e3647d
child 525807 04ca7570a4f3dfe2cf45381766a2606a0baed24b
push id23467
push userbmo:bpostelnicu@mozilla.com
push dateTue, 19 Jul 2016 18:29:26 +0000
reviewersdholbert
bugs1287743
milestone50.0a1
Bug 1287743 - Shift an assignment to be outside of an assert, in nsFrameSetFrame, to address a static-analysis issue. r?dholbert MozReview-Commit-ID: IsHZeFsGGJC
layout/generic/nsFrameSetFrame.cpp
--- a/layout/generic/nsFrameSetFrame.cpp
+++ b/layout/generic/nsFrameSetFrame.cpp
@@ -973,18 +973,20 @@ nsHTMLFramesetFrame::Reflow(nsPresContex
         if (eFrameborder_Yes == mChildFrameborder[childX]) {
           childVis = ALL_VIS;
         } else if (eFrameborder_No == mChildFrameborder[childX]) {
           childVis = NONE_VIS;
         } else {  // notset
           childVis = (eFrameborder_No == frameborder) ? NONE_VIS : ALL_VIS;
         }
       } else {  // blank
-        DebugOnly<nsHTMLFramesetBlankFrame*> blank;
-        MOZ_ASSERT(blank = do_QueryFrame(child), "unexpected child frame type");
+#ifdef DEBUG
+        nsHTMLFramesetBlankFrame* blank = do_QueryFrame(child);
+        MOZ_ASSERT(blank, "unexpected child frame type");
+#endif
         childVis = NONE_VIS;
       }
       nsBorderColor childColors = mChildBorderColors[childX];
       // set the visibility, color of our edge borders based on children
       if (0 == cellIndex.x) {
         if (!(mEdgeVisibility & LEFT_VIS)) {
           mEdgeVisibility |= (LEFT_VIS & childVis);
         }