Index: Source/core/dom/DOMStringMap.h |
diff --git a/Source/core/dom/DOMStringMap.h b/Source/core/dom/DOMStringMap.h |
index 22ce97497f1d8f1e8c2f263057966803eb0719af..fb4d17bc72d67e05e552096d2f58cd18be92ec2a 100644 |
--- a/Source/core/dom/DOMStringMap.h |
+++ b/Source/core/dom/DOMStringMap.h |
@@ -28,6 +28,7 @@ |
#include "bindings/v8/ExceptionState.h" |
#include "bindings/v8/ScriptWrappable.h" |
+#include "bindings/v8/V8Binding.h" |
#include "wtf/Noncopyable.h" |
#include "wtf/Vector.h" |
#include "wtf/text/WTFString.h" |
@@ -48,24 +49,16 @@ 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&) |
+ DeleteResult anonymousNamedDeleter(const AtomicString& name) |
{ |
- // 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 |
- return result; |
+ bool knownProperty = deleteItem(name); |
+ return knownProperty ? DeleteSuccess : DeleteUnknownProperty; |
} |
void namedPropertyEnumerator(Vector<String>& names, ExceptionState&) |
{ |
@@ -81,9 +74,9 @@ public: |
{ |
return anonymousNamedSetter(String::number(index), value, exceptionState); |
} |
- bool anonymousIndexedDeleter(uint32_t index, ExceptionState& exceptionState) |
+ DeleteResult anonymousIndexedDeleter(uint32_t index) |
{ |
- return anonymousNamedDeleter(AtomicString::number(index), exceptionState); |
+ return anonymousNamedDeleter(AtomicString::number(index)); |
} |
virtual Element* element() = 0; |