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

Unified Diff: Source/bindings/tests/results/V8TestEventTarget.cpp

Issue 106853005: Implement platform deleters per spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Switch to DeleteResult enum + extend scheme to indexed deleters 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/bindings/tests/results/V8TestEventTarget.cpp
diff --git a/Source/bindings/tests/results/V8TestEventTarget.cpp b/Source/bindings/tests/results/V8TestEventTarget.cpp
index 315c861ef91db82d8a53160430a55a070f185d77..4b986581d50fdda7dc25b1032a3723de6c4c2f70 100644
--- a/Source/bindings/tests/results/V8TestEventTarget.cpp
+++ b/Source/bindings/tests/results/V8TestEventTarget.cpp
@@ -145,10 +145,11 @@ static void indexedPropertyDeleter(unsigned index, const v8::PropertyCallbackInf
{
TestEventTarget* collection = V8TestEventTarget::toNative(info.Holder());
ExceptionState exceptionState(info.Holder(), info.GetIsolate());
- bool result = collection->anonymousIndexedDeleter(index, exceptionState);
+ DeleteResult result = collection->anonymousIndexedDeleter(index, exceptionState);
if (exceptionState.throwIfNeeded())
return;
- return v8SetReturnValueBool(info, result);
+ if (result != DeleteUnknownProperty)
+ return v8SetReturnValueBool(info, result == DeleteSuccess);
}
static void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Boolean>& info)
@@ -215,8 +216,9 @@ static void namedPropertyDeleter(v8::Local<v8::String> name, const v8::PropertyC
{
TestEventTarget* collection = V8TestEventTarget::toNative(info.Holder());
AtomicString propertyName = toCoreAtomicString(name);
- bool result = collection->anonymousNamedDeleter(propertyName);
- return v8SetReturnValueBool(info, result);
+ DeleteResult result = collection->anonymousNamedDeleter(propertyName);
+ if (result != DeleteUnknownProperty)
+ return v8SetReturnValueBool(info, result == DeleteSuccess);
}
static void namedPropertyDeleterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Boolean>& info)

Powered by Google App Engine
This is Rietveld 408576698