Index: Source/core/svg/properties/SVGListPropertyTearOffHelper.h |
diff --git a/Source/core/svg/properties/SVGListPropertyTearOffHelper.h b/Source/core/svg/properties/SVGListPropertyTearOffHelper.h |
index 68fbc99b3544545b7e7f1eabca3f6eb51bf10f97..08e46005a932fc9d9889d49543ebca9dc56f56df 100644 |
--- a/Source/core/svg/properties/SVGListPropertyTearOffHelper.h |
+++ b/Source/core/svg/properties/SVGListPropertyTearOffHelper.h |
@@ -162,6 +162,11 @@ public: |
PassRefPtrWillBeRawPtr<ItemTearOffType> removeItem(unsigned long index, ExceptionState& exceptionState) |
{ |
+ if (toDerived()->isImmutable()) { |
+ exceptionState.throwDOMException(NoModificationAllowedError, "The object is read-only."); |
+ return nullptr; |
+ } |
+ |
RefPtrWillBeRawPtr<ItemPropertyType> value = toDerived()->target()->removeItem(index, exceptionState); |
toDerived()->commitChange(); |