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

Side by Side Diff: Source/bindings/tests/results/core/V8TestTypedefs.cpp

Issue 968593002: bindings: Supports constructor attributes on prototype chains. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6 6
7 #include "config.h" 7 #include "config.h"
8 #include "V8TestTypedefs.h" 8 #include "V8TestTypedefs.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 23 matching lines...) Expand all
34 34
35 namespace TestTypedefsV8Internal { 35 namespace TestTypedefsV8Internal {
36 36
37 template<class CallbackInfo> 37 template<class CallbackInfo>
38 static void TestTypedefsForceSetAttributeOnThis(v8::Local<v8::String> name, v8:: Local<v8::Value> v8Value, const CallbackInfo& info) 38 static void TestTypedefsForceSetAttributeOnThis(v8::Local<v8::String> name, v8:: Local<v8::Value> v8Value, const CallbackInfo& info)
39 { 39 {
40 ASSERT(info.This()->IsObject()); 40 ASSERT(info.This()->IsObject());
41 v8::Local<v8::Object>::Cast(info.This())->ForceSet(name, v8Value); 41 v8::Local<v8::Object>::Cast(info.This())->ForceSet(name, v8Value);
42 } 42 }
43 43
44 static void TestTypedefsForceSetAttributeOnThisCallback(v8::Local<v8::String> na me, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
45 {
46 TestTypedefsV8Internal::TestTypedefsForceSetAttributeOnThis(name, v8Value, i nfo);
47 }
48
49 static void uLongLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8: :Value>& info) 44 static void uLongLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8: :Value>& info)
50 { 45 {
51 v8::Local<v8::Object> holder = info.Holder(); 46 v8::Local<v8::Object> holder = info.Holder();
52 TestTypedefs* impl = V8TestTypedefs::toImpl(holder); 47 TestTypedefs* impl = V8TestTypedefs::toImpl(holder);
53 v8SetReturnValue(info, static_cast<double>(impl->uLongLongAttribute())); 48 v8SetReturnValue(info, static_cast<double>(impl->uLongLongAttribute()));
54 } 49 }
55 50
56 static void uLongLongAttributeAttributeGetterCallback(v8::Local<v8::String>, con st v8::PropertyCallbackInfo<v8::Value>& info) 51 static void uLongLongAttributeAttributeGetterCallback(v8::Local<v8::String>, con st v8::PropertyCallbackInfo<v8::Value>& info)
57 { 52 {
58 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 53 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
(...skipping 12 matching lines...) Expand all
71 impl->setULongLongAttribute(cppValue); 66 impl->setULongLongAttribute(cppValue);
72 } 67 }
73 68
74 static void uLongLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8: :Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 69 static void uLongLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8: :Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
75 { 70 {
76 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 71 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
77 TestTypedefsV8Internal::uLongLongAttributeAttributeSetter(v8Value, info); 72 TestTypedefsV8Internal::uLongLongAttributeAttributeSetter(v8Value, info);
78 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 73 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
79 } 74 }
80 75
81 static void TestTypedefsConstructorGetter(v8::Local<v8::String>, const v8::Prope rtyCallbackInfo<v8::Value>& info) 76 static void tAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Pr opertyCallbackInfo<void>& info)
82 { 77 {
83 v8::Local<v8::Value> data = info.Data(); 78 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "tAtt ribute");
84 ASSERT(data->IsExternal()); 79 TestTypedefsForceSetAttributeOnThis(propertyName, v8Value, info);
85 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre ationContext()); 80 }
86 if (!perContextData) 81
87 return; 82 static void tAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v 8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
88 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u nwrap(data))); 83 {
84 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
85 TestTypedefsV8Internal::tAttributeAttributeSetter(v8Value, info);
86 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
89 } 87 }
90 88
91 static void voidMethodArrayOfLongsArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) 89 static void voidMethodArrayOfLongsArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
92 { 90 {
93 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodA rrayOfLongsArg", "TestTypedefs", info.Holder(), info.GetIsolate()); 91 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodA rrayOfLongsArg", "TestTypedefs", info.Holder(), info.GetIsolate());
94 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder()); 92 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder());
95 Vector<int> arrayOfLongsArg; 93 Vector<int> arrayOfLongsArg;
96 { 94 {
97 if (UNLIKELY(info.Length() <= 0)) { 95 if (UNLIKELY(info.Length() <= 0)) {
98 impl->voidMethodArrayOfLongsArg(); 96 impl->voidMethodArrayOfLongsArg();
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 RefPtr<TestTypedefs> impl = TestTypedefs::create(stringArg); 284 RefPtr<TestTypedefs> impl = TestTypedefs::create(stringArg);
287 v8::Local<v8::Object> wrapper = info.Holder(); 285 v8::Local<v8::Object> wrapper = info.Holder();
288 impl->associateWithWrapper(info.GetIsolate(), &V8TestTypedefs::wrapperTypeIn fo, wrapper); 286 impl->associateWithWrapper(info.GetIsolate(), &V8TestTypedefs::wrapperTypeIn fo, wrapper);
289 v8SetReturnValue(info, wrapper); 287 v8SetReturnValue(info, wrapper);
290 } 288 }
291 289
292 } // namespace TestTypedefsV8Internal 290 } // namespace TestTypedefsV8Internal
293 291
294 static const V8DOMConfiguration::AttributeConfiguration V8TestTypedefsAttributes [] = { 292 static const V8DOMConfiguration::AttributeConfiguration V8TestTypedefsAttributes [] = {
295 {"uLongLongAttribute", TestTypedefsV8Internal::uLongLongAttributeAttributeGe tterCallback, TestTypedefsV8Internal::uLongLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyA ttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration ::OnInstance}, 293 {"uLongLongAttribute", TestTypedefsV8Internal::uLongLongAttributeAttributeGe tterCallback, TestTypedefsV8Internal::uLongLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyA ttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration ::OnInstance},
296 {"tAttribute", TestTypedefsV8Internal::TestTypedefsConstructorGetter, TestTy pedefsV8Internal::TestTypedefsForceSetAttributeOnThisCallback, 0, 0, const_cast< WrapperTypeInfo*>(&V8TestInterface::wrapperTypeInfo), static_cast<v8::AccessCont rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfig uration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, 294 {"tAttribute", v8ConstructorAttributeGetterAsProperty, TestTypedefsV8Interna l::tAttributeAttributeSetterCallback, 0, 0, const_cast<WrapperTypeInfo*>(&V8Test Interface::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static _cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScri pts, V8DOMConfiguration::OnInstance},
297 }; 295 };
298 296
299 static const V8DOMConfiguration::MethodConfiguration V8TestTypedefsMethods[] = { 297 static const V8DOMConfiguration::MethodConfiguration V8TestTypedefsMethods[] = {
300 {"voidMethodArrayOfLongsArg", TestTypedefsV8Internal::voidMethodArrayOfLongs ArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 298 {"voidMethodArrayOfLongsArg", TestTypedefsV8Internal::voidMethodArrayOfLongs ArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
301 {"voidMethodFloatArgStringArg", TestTypedefsV8Internal::voidMethodFloatArgSt ringArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, 299 {"voidMethodFloatArgStringArg", TestTypedefsV8Internal::voidMethodFloatArgSt ringArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScripts},
302 {"voidMethodTestCallbackInterfaceTypeArg", TestTypedefsV8Internal::voidMetho dTestCallbackInterfaceTypeArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedTo AllScripts}, 300 {"voidMethodTestCallbackInterfaceTypeArg", TestTypedefsV8Internal::voidMetho dTestCallbackInterfaceTypeArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedTo AllScripts},
303 {"uLongLongMethodTestInterfaceEmptyTypeSequenceArg", TestTypedefsV8Internal: :uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethodCallback, 0, 1, V8DOMConf iguration::ExposedToAllScripts}, 301 {"uLongLongMethodTestInterfaceEmptyTypeSequenceArg", TestTypedefsV8Internal: :uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethodCallback, 0, 1, V8DOMConf iguration::ExposedToAllScripts},
304 {"testInterfaceOrTestInterfaceEmptyMethod", TestTypedefsV8Internal::testInte rfaceOrTestInterfaceEmptyMethodMethodCallback, 0, 0, V8DOMConfiguration::Exposed ToAllScripts}, 302 {"testInterfaceOrTestInterfaceEmptyMethod", TestTypedefsV8Internal::testInte rfaceOrTestInterfaceEmptyMethodMethodCallback, 0, 0, V8DOMConfiguration::Exposed ToAllScripts},
305 {"domStringOrDoubleMethod", TestTypedefsV8Internal::domStringOrDoubleMethodM ethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 303 {"domStringOrDoubleMethod", TestTypedefsV8Internal::domStringOrDoubleMethodM ethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
306 {"arrayOfStringsMethodArrayOfStringsArg", TestTypedefsV8Internal::arrayOfStr ingsMethodArrayOfStringsArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAl lScripts}, 304 {"arrayOfStringsMethodArrayOfStringsArg", TestTypedefsV8Internal::arrayOfStr ingsMethodArrayOfStringsArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAl lScripts},
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 { 365 {
368 scriptWrappable->toImpl<TestTypedefs>()->ref(); 366 scriptWrappable->toImpl<TestTypedefs>()->ref();
369 } 367 }
370 368
371 void V8TestTypedefs::derefObject(ScriptWrappable* scriptWrappable) 369 void V8TestTypedefs::derefObject(ScriptWrappable* scriptWrappable)
372 { 370 {
373 scriptWrappable->toImpl<TestTypedefs>()->deref(); 371 scriptWrappable->toImpl<TestTypedefs>()->deref();
374 } 372 }
375 373
376 } // namespace blink 374 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698