Index: third_party/WebKit/Source/core/svg/SVGAngleTearOff.cpp |
diff --git a/third_party/WebKit/Source/core/svg/SVGAngleTearOff.cpp b/third_party/WebKit/Source/core/svg/SVGAngleTearOff.cpp |
index 7e62fca7224f4c6e022d29ac0e7c04597e2633f7..120733b34ed2821ba0e4d49b9ee601cacd43ada6 100644 |
--- a/third_party/WebKit/Source/core/svg/SVGAngleTearOff.cpp |
+++ b/third_party/WebKit/Source/core/svg/SVGAngleTearOff.cpp |
@@ -97,9 +97,13 @@ void SVGAngleTearOff::convertToSpecifiedUnits(unsigned short unitType, Exception |
return; |
} |
- target()->convertToSpecifiedUnits(static_cast<SVGAngle::SVGAngleType>(unitType), exceptionState); |
- if (!exceptionState.hadException()) |
- commitChange(); |
+ if (target()->unitType() == SVGAngle::SVG_ANGLETYPE_UNKNOWN) { |
+ exceptionState.throwDOMException(NotSupportedError, "Cannot convert from unknown or invalid units."); |
+ return; |
+ } |
+ |
+ target()->convertToSpecifiedUnits(static_cast<SVGAngle::SVGAngleType>(unitType)); |
+ commitChange(); |
} |
void SVGAngleTearOff::setValueAsString(const String& value, ExceptionState& exceptionState) |