Index: Source/core/html/HTMLSelectElement.cpp |
diff --git a/Source/core/html/HTMLSelectElement.cpp b/Source/core/html/HTMLSelectElement.cpp |
index 8d64f496438ed7d3eb8f4fafae624f2866c00fc3..74f8627def91049db2f6f5c8ff788e38b50bd5f5 100644 |
--- a/Source/core/html/HTMLSelectElement.cpp |
+++ b/Source/core/html/HTMLSelectElement.cpp |
@@ -1550,20 +1550,14 @@ void HTMLSelectElement::finishParsingChildren() |
bool HTMLSelectElement::anonymousIndexedSetter(unsigned index, PassRefPtr<HTMLOptionElement> value, ExceptionState& exceptionState) |
{ |
- if (!value) { |
- exceptionState.throwTypeError(ExceptionMessages::failedToSet(String::number(index), "HTMLSelectElement", "The value provided was not an HTMLOptionElement.")); |
- return false; |
+ if (!value) { // undefined or null |
+ remove(index); |
+ return true; |
} |
setOption(index, value.get(), exceptionState); |
return true; |
} |
-bool HTMLSelectElement::anonymousIndexedSetterRemove(unsigned index, ExceptionState& exceptionState) |
-{ |
- remove(index); |
- return true; |
-} |
- |
bool HTMLSelectElement::isInteractiveContent() const |
{ |
return true; |