Chromium Code Reviews| Index: Source/core/svg/SVGAngleTearOff.cpp |
| diff --git a/Source/core/svg/SVGAngleTearOff.cpp b/Source/core/svg/SVGAngleTearOff.cpp |
| index 8a5f832ace8e6ee456c1aa82d5aebe6f3d21c665..b7556242bd8b1a891cde1bf70ae4814b6c0d2549 100644 |
| --- a/Source/core/svg/SVGAngleTearOff.cpp |
| +++ b/Source/core/svg/SVGAngleTearOff.cpp |
| @@ -32,6 +32,7 @@ |
| #include "core/svg/SVGAngleTearOff.h" |
| #include "bindings/v8/ExceptionState.h" |
| +#include "bindings/v8/ExceptionStatePlaceholder.h" |
| #include "core/dom/ExceptionCode.h" |
| namespace WebCore { |
| @@ -108,7 +109,16 @@ void SVGAngleTearOff::setValueAsString(const String& value, ExceptionState& exce |
| return; |
| } |
| + String old = target()->valueAsString(); |
|
fs
2014/06/11 07:29:07
Nit: s/old/oldValue/ (or something)
Erik Dahlström (inactive)
2014/06/11 08:04:25
Done.
|
| + |
| target()->setValueAsString(value, exceptionState); |
| + |
| + if (!exceptionState.hadException() && !hasExposedAngleUnit()) { |
| + target()->setValueAsString(old, IGNORE_EXCEPTION); // rollback to old value |
|
fs
2014/06/11 07:29:07
Nit: ASSERT_NO_EXCEPTION might be even better?
Erik Dahlström (inactive)
2014/06/11 08:04:25
Done.
|
| + exceptionState.throwDOMException(SyntaxError, "The value provided ('" + value + "') is invalid."); |
| + return; |
| + } |
| + |
| commitChange(); |
| } |