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

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

Issue 15899009: Support indexed setter generation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Use TreatNullAs, TreatUndefinedAs in case of value is null/undefined Created 7 years, 7 months 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 b6c85cd3dba329ae1b3e77c1b9e32e1d71c1b6c2..f2fd90bb2d8efeddefd34d07c9ecb40b8c55c4a3 100644
--- a/Source/bindings/tests/results/V8TestEventTarget.cpp
+++ b/Source/bindings/tests/results/V8TestEventTarget.cpp
@@ -164,7 +164,6 @@ v8::Handle<v8::Value> V8TestEventTarget::indexedPropertyGetter(uint32_t index, c
v8::Handle<v8::Boolean> V8TestEventTarget::indexedPropertyDeleter(unsigned index, const v8::AccessorInfo& info)
{
-
TestEventTarget* collection = toNative(info.Holder());
ExceptionCode ec = 0;
bool result = collection->anonymousIndexedDeleter(index, ec);
@@ -200,7 +199,11 @@ v8::Handle<v8::Value> V8TestEventTarget::namedPropertySetter(v8::Local<v8::Strin
TestEventTarget* collection = toNative(info.Holder());
V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, propertyName, name);
V8TRYCATCH_FOR_V8STRINGRESOURCE(V8StringResource<>, propertyValue, value);
- bool result = collection->anonymousNamedSetter(propertyName, propertyValue);
+ bool result;
+ if (value->IsUndefined())
+ result = collection->anonymousNamedSetterUndefined(propertyName);
+ else
+ result = collection->anonymousNamedSetter(propertyName, propertyValue);
if (!result)
return v8Undefined();
return value;
@@ -208,7 +211,6 @@ v8::Handle<v8::Value> V8TestEventTarget::namedPropertySetter(v8::Local<v8::Strin
v8::Handle<v8::Boolean> V8TestEventTarget::namedPropertyDeleter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
-
TestEventTarget* collection = toNative(info.Holder());
AtomicString propertyName = toWebCoreAtomicString(name);
bool result = collection->anonymousNamedDeleter(propertyName);

Powered by Google App Engine
This is Rietveld 408576698