Chromium Code Reviews| Index: Source/core/html/HTMLOptionsCollection.cpp |
| diff --git a/Source/core/html/HTMLOptionsCollection.cpp b/Source/core/html/HTMLOptionsCollection.cpp |
| index 34154a054bf551d068e9cd6e9544a032fdf6eabd..aae87b078b91e92c0d6e2a108c83a51ec86dfb58 100644 |
| --- a/Source/core/html/HTMLOptionsCollection.cpp |
| +++ b/Source/core/html/HTMLOptionsCollection.cpp |
| @@ -52,12 +52,12 @@ void HTMLOptionsCollection::add(PassRefPtr<HTMLOptionElement> element, int index |
| HTMLOptionElement* newOption = element.get(); |
| if (!newOption) { |
| - exceptionState.throwDOMException(TypeMismatchError, ExceptionMessages::failedToExecute("add", "HTMLOptionsCollection", "The element provided was not an HTMLOptionElement.")); |
| + exceptionState.throwTypeError("The element provided was not an HTMLOptionElement."); |
| return; |
| } |
| if (index < -1) { |
| - exceptionState.throwDOMException(IndexSizeError, ExceptionMessages::failedToExecute("add", "HTMLOptionsCollection", "The index provided (" + String::number(index) + ") is less than -1.")); |
| + exceptionState.throwDOMException(IndexSizeError, "The index provided (" + String::number(index) + ") is less than -1."); |
| return; |
| } |
| @@ -125,7 +125,7 @@ bool HTMLOptionsCollection::anonymousIndexedSetter(unsigned index, PassRefPtr<HT |
| { |
| HTMLSelectElement* base = toHTMLSelectElement(ownerNode()); |
| if (!value) { |
| - exceptionState.throwDOMException(TypeMismatchError, ExceptionMessages::failedToSet(String::number(index), "HTMLOptionsCollection", "The element provided was not an HTMLOptionElement.")); |
| + exceptionState.throwTypeError(ExceptionMessages::failedToSet(String::number(index), "HTMLOptionsCollection", "The element provided was not an HTMLOptionElement.")); |
|
Mike West
2013/12/02 11:18:13
We'll take care of this one in Bindings, I suppose
sof
2013/12/02 11:21:55
Yes, once the generated indexedPropertySetter() pa
|
| return true; |
| } |
| base->setOption(index, value.get(), exceptionState); |