Chromium Code Reviews| 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) |