Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(773)

Unified Diff: third_party/WebKit/Source/core/svg/SVGPointTearOff.cpp

Issue 2357463002: Consolidate read-only exception throwing for SVG*TearOffs (Closed)
Patch Set: Baseline updates Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/svg/SVGPointTearOff.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGPointTearOff.cpp b/third_party/WebKit/Source/core/svg/SVGPointTearOff.cpp
index a907cd2c7ab4bae62ab4d9103552d52ca82461cc..fe9bbbc32c816696feca17d547822c506bcb9223 100644
--- a/third_party/WebKit/Source/core/svg/SVGPointTearOff.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGPointTearOff.cpp
@@ -30,8 +30,6 @@
#include "core/svg/SVGPointTearOff.h"
-#include "bindings/core/v8/ExceptionState.h"
-#include "core/dom/ExceptionCode.h"
#include "core/svg/SVGElement.h"
#include "core/svg/SVGMatrixTearOff.h"
@@ -45,10 +43,9 @@ SVGPointTearOff::SVGPointTearOff(SVGPoint* target, SVGElement* contextElement, P
void SVGPointTearOff::setX(float f, ExceptionState& exceptionState)
{
if (isImmutable()) {
- exceptionState.throwDOMException(NoModificationAllowedError, "The attribute is read-only.");
+ throwReadOnly(exceptionState);
return;
}
-
target()->setX(f);
commitChange();
}
@@ -56,10 +53,9 @@ void SVGPointTearOff::setX(float f, ExceptionState& exceptionState)
void SVGPointTearOff::setY(float f, ExceptionState& exceptionState)
{
if (isImmutable()) {
- exceptionState.throwDOMException(NoModificationAllowedError, "The attribute is read-only.");
+ throwReadOnly(exceptionState);
return;
}
-
target()->setY(f);
commitChange();
}

Powered by Google App Engine
This is Rietveld 408576698