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

Side by Side Diff: Source/bindings/tests/results/V8TestEventTarget.cpp

Issue 15076011: Support union return type for anonymous named/indexed getter (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 This file is part of the Blink open source project. 2 This file is part of the Blink open source project.
3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY!
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 {"removeEventListener", TestEventTargetV8Internal::removeEventListenerMethod Callback, 0, 2}, 192 {"removeEventListener", TestEventTargetV8Internal::removeEventListenerMethod Callback, 0, 2},
193 }; 193 };
194 194
195 v8::Handle<v8::Value> V8TestEventTarget::indexedPropertyGetter(uint32_t index, c onst v8::AccessorInfo& info) 195 v8::Handle<v8::Value> V8TestEventTarget::indexedPropertyGetter(uint32_t index, c onst v8::AccessorInfo& info)
196 { 196 {
197 ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder())); 197 ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder()));
198 TestEventTarget* collection = toNative(info.Holder()); 198 TestEventTarget* collection = toNative(info.Holder());
199 RefPtr<Node> element = collection->item(index); 199 RefPtr<Node> element = collection->item(index);
200 if (!element) 200 if (!element)
201 return v8Undefined(); 201 return v8Undefined();
202 return toV8Fast(element.release(), info, collection); 202
203 v8::Handle<v8::Value> jsValue;
204 jsValue = toV8Fast(element.release(), info, collection);
205 return jsValue;
203 } 206 }
204 207
205 v8::Handle<v8::Value> V8TestEventTarget::namedPropertyGetter(v8::Local<v8::Strin g> name, const v8::AccessorInfo& info) 208 v8::Handle<v8::Value> V8TestEventTarget::namedPropertyGetter(v8::Local<v8::Strin g> name, const v8::AccessorInfo& info)
206 { 209 {
207 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) 210 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty())
208 return v8Undefined(); 211 return v8Undefined();
209 if (info.Holder()->HasRealNamedCallbackProperty(name)) 212 if (info.Holder()->HasRealNamedCallbackProperty(name))
210 return v8Undefined(); 213 return v8Undefined();
211 214
212 ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder())); 215 ASSERT(V8DOMWrapper::maybeDOMWrapper(info.Holder()));
213 TestEventTarget* collection = toNative(info.Holder()); 216 TestEventTarget* collection = toNative(info.Holder());
214 AtomicString propertyName = toWebCoreAtomicString(name); 217 AtomicString propertyName = toWebCoreAtomicString(name);
215 RefPtr<Node> element = collection->namedItem(propertyName); 218 RefPtr<Node> element = collection->namedItem(propertyName);
216 if (!element) 219 if (!element)
217 return v8Undefined(); 220 return v8Undefined();
218 return toV8Fast(element.release(), info, collection); 221
222 v8::Handle<v8::Value> jsValue;
223 jsValue = toV8Fast(element.release(), info, collection);
224 return jsValue;
219 } 225 }
220 226
221 static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestEventTargetTemplate(v 8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWorldType) 227 static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestEventTargetTemplate(v 8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWorldType)
222 { 228 {
223 desc->ReadOnlyPrototype(); 229 desc->ReadOnlyPrototype();
224 230
225 v8::Local<v8::Signature> defaultSignature; 231 v8::Local<v8::Signature> defaultSignature;
226 defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestEventTar get", v8::Persistent<v8::FunctionTemplate>(), V8TestEventTarget::internalFieldCo unt, 232 defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestEventTar get", v8::Persistent<v8::FunctionTemplate>(), V8TestEventTarget::internalFieldCo unt,
227 0, 0, 233 0, 0,
228 V8TestEventTargetMethods, WTF_ARRAY_LENGTH(V8TestEventTargetMethods), is olate, currentWorldType); 234 V8TestEventTargetMethods, WTF_ARRAY_LENGTH(V8TestEventTargetMethods), is olate, currentWorldType);
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 installPerContextProperties(wrapper, impl.get(), isolate); 300 installPerContextProperties(wrapper, impl.get(), isolate);
295 V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, hasD ependentLifetime ? WrapperConfiguration::Dependent : WrapperConfiguration::Indep endent); 301 V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, hasD ependentLifetime ? WrapperConfiguration::Dependent : WrapperConfiguration::Indep endent);
296 return wrapper; 302 return wrapper;
297 } 303 }
298 void V8TestEventTarget::derefObject(void* object) 304 void V8TestEventTarget::derefObject(void* object)
299 { 305 {
300 static_cast<TestEventTarget*>(object)->deref(); 306 static_cast<TestEventTarget*>(object)->deref();
301 } 307 }
302 308
303 } // namespace WebCore 309 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698