Bug 1110460, part 4 - Fix MOZ_ASSERT bug in nsComputedDOMStyle.cpp. r=dholbert
authorJonathan Watt <jwatt@jwatt.org>
Wed, 17 Feb 2016 00:19:26 +0000
changeset 321554 88b3e949fa51f1601fbb92e5303f2c38dced99c8
parent 321553 64a6ad68950397be337c5692f62db4db4499cbd5
child 321555 81a1b358fd19ede028b63f5b2764011675be8783
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1110460
milestone47.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 1110460, part 4 - Fix MOZ_ASSERT bug in nsComputedDOMStyle.cpp. r=dholbert
layout/style/nsComputedDOMStyle.cpp
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -5863,17 +5863,18 @@ nsComputedDOMStyle::CreatePrimitiveValue
                             aStyleBasicShape->Coordinates()[i + 1]);
           shapeFunctionString.Append(coordString);
         }
         break;
       }
       case nsStyleBasicShape::Type::eCircle:
       case nsStyleBasicShape::Type::eEllipse: {
         const nsTArray<nsStyleCoord>& radii = aStyleBasicShape->Coordinates();
-        MOZ_ASSERT(radii.Length() == (nsStyleBasicShape::Type::eCircle ? 1 : 2),
+        MOZ_ASSERT(radii.Length() ==
+                   (type == nsStyleBasicShape::Type::eCircle ? 1 : 2),
                    "wrong number of radii");
         for (size_t i = 0; i < radii.Length(); ++i) {
           nsAutoString radius;
           RefPtr<nsROCSSPrimitiveValue> value = new nsROCSSPrimitiveValue;
           bool clampNegativeCalc = true;
           SetValueToCoord(value, radii[i], clampNegativeCalc, nullptr,
                           nsCSSProps::kShapeRadiusKTable);
           value->GetCssText(radius);