Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(444)

Unified Diff: Source/core/dom/DOMStringMap.h

Issue 106853005: Implement platform deleters per spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698