Bug 914919 - Downgrade BaseRect::Set*Edge assertions to be non-fatal. r=dholbert
authorCorey Ford <cford@mozilla.com>
Wed, 11 Sep 2013 16:27:14 -0700
changeset 160176 e67dad88f86054c1d90adb48ce671177a3d6f119
parent 160175 0d87616d0acf6600513ea6574d424711e30235c2
child 160177 6de097e252beb940ead8bdd0ac9aa4b31d70a61e
push id2961
push userlsblakk@mozilla.com
push dateMon, 28 Oct 2013 21:59:28 +0000
treeherdermozilla-beta@73ef4f13486f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs914919
milestone26.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 914919 - Downgrade BaseRect::Set*Edge assertions to be non-fatal. r=dholbert
gfx/2d/BaseRect.h
layout/generic/crashtests/914919.html
layout/generic/crashtests/crashtests.list
--- a/gfx/2d/BaseRect.h
+++ b/gfx/2d/BaseRect.h
@@ -2,18 +2,18 @@
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef MOZILLA_GFX_BASERECT_H_
 #define MOZILLA_GFX_BASERECT_H_
 
 #include <cmath>
-#include <mozilla/Assertions.h>
 #include <algorithm>
+#include "nsDebug.h"
 
 namespace mozilla {
 namespace gfx {
 
 /**
  * Rectangles have two interpretations: a set of (zero-size) points,
  * and a rectangular area of the plane. Most rectangle operations behave
  * the same no matter what interpretation is being used, but some operations
@@ -272,31 +272,31 @@ struct BaseRect {
   T Y() const { return y; }
   T Width() const { return width; }
   T Height() const { return height; }
   T XMost() const { return x + width; }
   T YMost() const { return y + height; }
 
   // Moves one edge of the rect without moving the opposite edge.
   void SetLeftEdge(T aX) {
-    MOZ_ASSERT(aX <= XMost());
+    NS_ASSERTION(aX <= XMost(), "Bad rect edge");
     width = XMost() - aX;
     x = aX;
   }
   void SetRightEdge(T aXMost) { 
-    MOZ_ASSERT(aXMost >= x);
+    NS_ASSERTION(aXMost >= x, "Bad rect edge");
     width = aXMost - x; 
   }
   void SetTopEdge(T aY) {
-    MOZ_ASSERT(aY <= YMost());
+    NS_ASSERTION(aY <= YMost(), "Bad rect edge");
     height = YMost() - aY;
     y = aY;
   }
   void SetBottomEdge(T aYMost) { 
-    MOZ_ASSERT(aYMost >= y);
+    NS_ASSERTION(aYMost >= y, "Bad rect edge");
     height = aYMost - y; 
   }
 
   // Round the rectangle edges to integer coordinates, such that the rounded
   // rectangle has the same set of pixel centers as the original rectangle.
   // Edges at offset 0.5 round up.
   // Suitable for most places where integral device coordinates
   // are needed, but note that any translation should be applied first to
new file mode 100644
--- /dev/null
+++ b/layout/generic/crashtests/914919.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+</head>
+<body>
+<div style="position: sticky; right: 75px; padding-left: 84862313px;"></div>
+</body>
+</html>
--- a/layout/generic/crashtests/crashtests.list
+++ b/layout/generic/crashtests/crashtests.list
@@ -496,8 +496,9 @@ test-pref(layout.css.flexbox.enabled,tru
 test-pref(layout.css.flexbox.enabled,true) load 854263-1.html
 test-pref(layout.css.flexbox.enabled,true) load 862947-1.html
 needs-focus pref(accessibility.browsewithcaret,true) load 868906.html
 test-pref(layout.css.flexbox.enabled,true) load 866547-1.html
 asserts(1-4) test-pref(layout.css.flexbox.enabled,true) load 876074-1.html # bug 876749
 load 885009-1.html
 load 893523.html
 test-pref(layout.css.sticky.enabled,true) load 914891.html
+asserts(1) test-pref(layout.css.sticky.enabled,true) load 914919.html