Chromium Code Reviews| Index: Source/core/dom/DOMStringMap.h |
| diff --git a/Source/core/dom/DOMStringMap.h b/Source/core/dom/DOMStringMap.h |
| index 22ce97497f1d8f1e8c2f263057966803eb0719af..73096131151eeb045ca13484e92edcdf424a5dd2 100644 |
| --- a/Source/core/dom/DOMStringMap.h |
| +++ b/Source/core/dom/DOMStringMap.h |
| @@ -48,23 +48,15 @@ public: |
| virtual String item(const String& name) = 0; |
| virtual bool contains(const String& name) = 0; |
| virtual void setItem(const String& name, const String& value, ExceptionState&) = 0; |
| - virtual void deleteItem(const String& name, ExceptionState&) = 0; |
| + virtual bool deleteItem(const String& name) = 0; |
| bool anonymousNamedSetter(const String& name, const String& value, ExceptionState& exceptionState) |
| { |
| setItem(name, value, exceptionState); |
| return true; |
| } |
| - bool anonymousNamedDeleter(const AtomicString& name, ExceptionState&) |
| + bool anonymousNamedDeleter(const AtomicString& name, bool& result) |
| { |
| - // FIXME: Remove ExceptionState parameter. |
| - |
| - TrackExceptionState exceptionState; |
| - deleteItem(name, exceptionState); |
| - bool result = !exceptionState.hadException(); |
| - // DOMStringMap deleter should ignore exception. |
| - // Behavior of Firefox and Opera are same. |
| - // delete document.body.dataset["-foo"] // false instead of DOM Exception 12 |
| - // LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-multiple.html |
| + result = deleteItem(name); |
| return result; |
| } |
| void namedPropertyEnumerator(Vector<String>& names, ExceptionState&) |
| @@ -81,9 +73,11 @@ public: |
| { |
| return anonymousNamedSetter(String::number(index), value, exceptionState); |
| } |
| - bool anonymousIndexedDeleter(uint32_t index, ExceptionState& exceptionState) |
| + bool anonymousIndexedDeleter(uint32_t index) |
| { |
| - return anonymousNamedDeleter(AtomicString::number(index), exceptionState); |
| + bool result; |
| + anonymousNamedDeleter(AtomicString::number(index), result); |
| + return true; |
|
haraken
2013/12/17 15:59:20
Don't we want to return |result| ?
sof
2013/12/17 16:20:08
4.7.4.1 (the indexed case) in the spec tells us th
|
| } |
| virtual Element* element() = 0; |