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

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

Issue 14261002: Make generator function data path more clear. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: rebased to latest Created 7 years, 8 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
« no previous file with comments | « Source/bindings/scripts/CodeGeneratorV8.pm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/tests/results/V8TestEventTarget.cpp
diff --git a/Source/bindings/tests/results/V8TestEventTarget.cpp b/Source/bindings/tests/results/V8TestEventTarget.cpp
index dbda8ce06d93d8b497f78423b2a48ab5d5a77e05..660296df97977c820bf2280f8212ef8902fa3220 100644
--- a/Source/bindings/tests/results/V8TestEventTarget.cpp
+++ b/Source/bindings/tests/results/V8TestEventTarget.cpp
@@ -174,6 +174,30 @@ static const V8DOMConfiguration::BatchedMethod V8TestEventTargetMethods[] = {
{"removeEventListener", TestEventTargetV8Internal::removeEventListenerMethodCallback, 0},
};
+v8::Handle<v8::Value> V8TestEventTarget::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+ if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty())
+ return v8Undefined();
+ if (info.Holder()->HasRealNamedCallbackProperty(name))
+ return v8Undefined();
+
+ v8::Local<v8::Object> object = info.Holder();
+ v8::Handle<v8::Object> creationContext = info.Holder();
+ v8::Isolate* isolate = info.GetIsolate();
+
+ ASSERT(V8DOMWrapper::maybeDOMWrapper(object));
+ ASSERT(toWrapperTypeInfo(object) != &V8Node::info);
+ TestEventTarget* collection = toNative(object);
+
+ AtomicString propertyName = toWebCoreAtomicStringWithNullCheck(name);
+ RefPtr<Node> element = collection->namedItem(propertyName);
+
+ if (!element)
+ return v8Undefined();
+
+ return toV8(element.release(), creationContext, isolate);
+}
+
static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestEventTargetTemplate(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWorldType)
{
desc->ReadOnlyPrototype();
@@ -233,29 +257,6 @@ EventTarget* V8TestEventTarget::toEventTarget(v8::Handle<v8::Object> object)
return toNative(object);
}
-v8::Handle<v8::Value> V8TestEventTarget::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
-{
- if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty())
- return v8Undefined();
- if (info.Holder()->HasRealNamedCallbackProperty(name))
- return v8Undefined();
-
- v8::Local<v8::Object> object = info.Holder();
- v8::Handle<v8::Object> creationContext = info.Holder();
- v8::Isolate* isolate = info.GetIsolate();
-
- ASSERT(V8DOMWrapper::maybeDOMWrapper(object));
- ASSERT(toWrapperTypeInfo(object) != &V8Node::info);
- TestEventTarget* collection = toNative(object);
-
- AtomicString propertyName = toWebCoreAtomicStringWithNullCheck(name);
- RefPtr<Node> element = collection->namedItem(propertyName);
-
- if (!element)
- return v8Undefined();
-
- return toV8(element.release(), creationContext, isolate);
-}
v8::Handle<v8::Object> V8TestEventTarget::createWrapper(PassRefPtr<TestEventTarget> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
{
« no previous file with comments | « Source/bindings/scripts/CodeGeneratorV8.pm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698