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

Unified Diff: third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperationsNotEnumerable.cpp

Issue 2321073002: binding: Let indexed interceptor falls through to named interceptor. (Closed)
Patch Set: Updated global-interface-listing expectations. Created 4 years, 3 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: third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperationsNotEnumerable.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperationsNotEnumerable.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperationsNotEnumerable.cpp
index c50aa143c83d8585d4be493d7d136d5d8c3c0d3f..e4ddfdbf82364fd945039b30d410ee41f03d1edc 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperationsNotEnumerable.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperationsNotEnumerable.cpp
@@ -46,36 +46,37 @@ static_assert(
namespace TestSpecialOperationsNotEnumerableV8Internal {
-static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info)
+static void namedPropertyGetter(const AtomicString& name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestSpecialOperationsNotEnumerable* impl = V8TestSpecialOperationsNotEnumerable::toImpl(info.Holder());
- String result = impl->anonymousIndexedGetter(index);
+ String result = impl->anonymousNamedGetter(name);
if (result.isNull())
return;
v8SetReturnValueString(info, result, info.GetIsolate());
}
-void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info)
+void namedPropertyGetterCallback(v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
- TestSpecialOperationsNotEnumerableV8Internal::indexedPropertyGetter(index, info);
+ if (!name->IsString())
+ return;
+ const AtomicString& propertyName = toCoreAtomicString(name.As<v8::String>());
+
+ TestSpecialOperationsNotEnumerableV8Internal::namedPropertyGetter(propertyName, info);
}
-static void namedPropertyGetter(v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info)
{
- auto nameString = name.As<v8::String>();
TestSpecialOperationsNotEnumerable* impl = V8TestSpecialOperationsNotEnumerable::toImpl(info.Holder());
- AtomicString propertyName = toCoreAtomicString(nameString);
- String result = impl->anonymousNamedGetter(propertyName);
+
+ String result = impl->anonymousIndexedGetter(index);
if (result.isNull())
return;
v8SetReturnValueString(info, result, info.GetIsolate());
}
-void namedPropertyGetterCallback(v8::Local<v8::Name> name, const v8::PropertyCallbackInfo<v8::Value>& info)
+void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info)
{
- if (!name->IsString())
- return;
- TestSpecialOperationsNotEnumerableV8Internal::namedPropertyGetter(name, info);
+ TestSpecialOperationsNotEnumerableV8Internal::indexedPropertyGetter(index, info);
}
} // namespace TestSpecialOperationsNotEnumerableV8Internal

Powered by Google App Engine
This is Rietveld 408576698