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

Unified Diff: Source/core/storage/Storage.cpp

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
« Source/core/dom/DOMStringMap.h ('K') | « Source/core/storage/Storage.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/storage/Storage.cpp
diff --git a/Source/core/storage/Storage.cpp b/Source/core/storage/Storage.cpp
index 76abd82a300ffeb590d682add181d3dc831bcee6..a1481009ff070cac7cab2bba96f7e19e002216e8 100644
--- a/Source/core/storage/Storage.cpp
+++ b/Source/core/storage/Storage.cpp
@@ -78,20 +78,24 @@ bool Storage::anonymousIndexedSetter(unsigned index, const AtomicString& value,
return anonymousNamedSetter(AtomicString::number(index), value, exceptionState);
}
-bool Storage::anonymousNamedDeleter(const AtomicString& name, ExceptionState& exceptionState)
+bool Storage::anonymousNamedDeleter(const AtomicString& name, bool& result, ExceptionState& exceptionState)
haraken 2013/12/17 15:59:20 I'm a bit confused. What's the difference between
sof 2013/12/17 16:20:08 We need to represent three outcomes, * property
sof 2013/12/17 16:24:38 Forgot to say/ask...if the preference is to encode
haraken 2013/12/17 16:51:05 Thanks for the clarification! enum sounds better t
{
+ result = false;
bool found = contains(name, exceptionState);
if (!found || exceptionState.hadException())
return false;
removeItem(name, exceptionState);
if (exceptionState.hadException())
- return false;
+ return true;
+ result = true;
return true;
}
bool Storage::anonymousIndexedDeleter(unsigned index, ExceptionState& exceptionState)
{
- return anonymousNamedDeleter(AtomicString::number(index), exceptionState);
+ bool result;
+ anonymousNamedDeleter(AtomicString::number(index), result, exceptionState);
+ return true;
}
void Storage::namedPropertyEnumerator(Vector<String>& names, ExceptionState& exceptionState)
« Source/core/dom/DOMStringMap.h ('K') | « Source/core/storage/Storage.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698