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

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

Issue 984523003: bindings: Moves most of DOM attributes to prototype chains. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated test results. 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
« no previous file with comments | « Source/bindings/tests/results/core/V8TestObject.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 uLongLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8: :Value>& info) 44 static void uLongLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8: :Value>& info)
45 { 45 {
46 v8::Local<v8::Object> holder = info.Holder(); 46 v8::Local<v8::Object> holder = info.Holder();
47 TestTypedefs* impl = V8TestTypedefs::toImpl(holder); 47 TestTypedefs* impl = V8TestTypedefs::toImpl(holder);
48 v8SetReturnValue(info, static_cast<double>(impl->uLongLongAttribute())); 48 v8SetReturnValue(info, static_cast<double>(impl->uLongLongAttribute()));
49 } 49 }
50 50
51 static void uLongLongAttributeAttributeGetterCallback(v8::Local<v8::String>, con st v8::PropertyCallbackInfo<v8::Value>& info) 51 static void uLongLongAttributeAttributeGetterCallback(const v8::FunctionCallback Info<v8::Value>& info)
52 { 52 {
53 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 53 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
54 TestTypedefsV8Internal::uLongLongAttributeAttributeGetter(info); 54 TestTypedefsV8Internal::uLongLongAttributeAttributeGetter(info);
55 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 55 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
56 } 56 }
57 57
58 static void uLongLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons t v8::PropertyCallbackInfo<void>& info) 58 static void uLongLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons t v8::FunctionCallbackInfo<v8::Value>& info)
59 { 59 {
60 v8::Local<v8::Object> holder = info.Holder(); 60 v8::Local<v8::Object> holder = info.Holder();
61 ExceptionState exceptionState(ExceptionState::SetterContext, "uLongLongAttri bute", "TestTypedefs", holder, info.GetIsolate()); 61 ExceptionState exceptionState(ExceptionState::SetterContext, "uLongLongAttri bute", "TestTypedefs", holder, info.GetIsolate());
62 TestTypedefs* impl = V8TestTypedefs::toImpl(holder); 62 TestTypedefs* impl = V8TestTypedefs::toImpl(holder);
63 unsigned long long cppValue = toUInt64(v8Value, exceptionState); 63 unsigned long long cppValue = toUInt64(v8Value, exceptionState);
64 if (exceptionState.throwIfNeeded()) 64 if (exceptionState.throwIfNeeded())
65 return; 65 return;
66 impl->setULongLongAttribute(cppValue); 66 impl->setULongLongAttribute(cppValue);
67 } 67 }
68 68
69 static void uLongLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8: :Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 69 static void uLongLongAttributeAttributeSetterCallback(const v8::FunctionCallback Info<v8::Value>& info)
70 { 70 {
71 v8::Local<v8::Value> v8Value = info[0];
71 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 72 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
72 TestTypedefsV8Internal::uLongLongAttributeAttributeSetter(v8Value, info); 73 TestTypedefsV8Internal::uLongLongAttributeAttributeSetter(v8Value, info);
73 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 74 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
74 } 75 }
75 76
76 static void tAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Pr opertyCallbackInfo<void>& info) 77 static void tAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Pr opertyCallbackInfo<void>& info)
77 { 78 {
78 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "tAtt ribute"); 79 v8::Local<v8::String> propertyName = v8AtomicString(info.GetIsolate(), "tAtt ribute");
79 TestTypedefsForceSetAttributeOnThis(propertyName, v8Value, info); 80 TestTypedefsForceSetAttributeOnThis(propertyName, v8Value, info);
80 } 81 }
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 } 284 }
284 RefPtr<TestTypedefs> impl = TestTypedefs::create(stringArg); 285 RefPtr<TestTypedefs> impl = TestTypedefs::create(stringArg);
285 v8::Local<v8::Object> wrapper = info.Holder(); 286 v8::Local<v8::Object> wrapper = info.Holder();
286 impl->associateWithWrapper(info.GetIsolate(), &V8TestTypedefs::wrapperTypeIn fo, wrapper); 287 impl->associateWithWrapper(info.GetIsolate(), &V8TestTypedefs::wrapperTypeIn fo, wrapper);
287 v8SetReturnValue(info, wrapper); 288 v8SetReturnValue(info, wrapper);
288 } 289 }
289 290
290 } // namespace TestTypedefsV8Internal 291 } // namespace TestTypedefsV8Internal
291 292
292 static const V8DOMConfiguration::AttributeConfiguration V8TestTypedefsAttributes [] = { 293 static const V8DOMConfiguration::AttributeConfiguration V8TestTypedefsAttributes [] = {
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},
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}, 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},
295 }; 295 };
296 296
297 static const V8DOMConfiguration::AccessorConfiguration V8TestTypedefsAccessors[] = {
298 {"uLongLongAttribute", TestTypedefsV8Internal::uLongLongAttributeAttributeGe tterCallback, TestTypedefsV8Internal::uLongLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyA ttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts},
299 };
300
297 static const V8DOMConfiguration::MethodConfiguration V8TestTypedefsMethods[] = { 301 static const V8DOMConfiguration::MethodConfiguration V8TestTypedefsMethods[] = {
298 {"voidMethodArrayOfLongsArg", TestTypedefsV8Internal::voidMethodArrayOfLongs ArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 302 {"voidMethodArrayOfLongsArg", TestTypedefsV8Internal::voidMethodArrayOfLongs ArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
299 {"voidMethodFloatArgStringArg", TestTypedefsV8Internal::voidMethodFloatArgSt ringArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScripts}, 303 {"voidMethodFloatArgStringArg", TestTypedefsV8Internal::voidMethodFloatArgSt ringArgMethodCallback, 0, 2, V8DOMConfiguration::ExposedToAllScripts},
300 {"voidMethodTestCallbackInterfaceTypeArg", TestTypedefsV8Internal::voidMetho dTestCallbackInterfaceTypeArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedTo AllScripts}, 304 {"voidMethodTestCallbackInterfaceTypeArg", TestTypedefsV8Internal::voidMetho dTestCallbackInterfaceTypeArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedTo AllScripts},
301 {"uLongLongMethodTestInterfaceEmptyTypeSequenceArg", TestTypedefsV8Internal: :uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethodCallback, 0, 1, V8DOMConf iguration::ExposedToAllScripts}, 305 {"uLongLongMethodTestInterfaceEmptyTypeSequenceArg", TestTypedefsV8Internal: :uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethodCallback, 0, 1, V8DOMConf iguration::ExposedToAllScripts},
302 {"testInterfaceOrTestInterfaceEmptyMethod", TestTypedefsV8Internal::testInte rfaceOrTestInterfaceEmptyMethodMethodCallback, 0, 0, V8DOMConfiguration::Exposed ToAllScripts}, 306 {"testInterfaceOrTestInterfaceEmptyMethod", TestTypedefsV8Internal::testInte rfaceOrTestInterfaceEmptyMethodMethodCallback, 0, 0, V8DOMConfiguration::Exposed ToAllScripts},
303 {"domStringOrDoubleMethod", TestTypedefsV8Internal::domStringOrDoubleMethodM ethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 307 {"domStringOrDoubleMethod", TestTypedefsV8Internal::domStringOrDoubleMethodM ethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
304 {"arrayOfStringsMethodArrayOfStringsArg", TestTypedefsV8Internal::arrayOfStr ingsMethodArrayOfStringsArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAl lScripts}, 308 {"arrayOfStringsMethodArrayOfStringsArg", TestTypedefsV8Internal::arrayOfStr ingsMethodArrayOfStringsArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAl lScripts},
305 {"stringArrayMethodStringArrayArg", TestTypedefsV8Internal::stringArrayMetho dStringArrayArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, 309 {"stringArrayMethodStringArrayArg", TestTypedefsV8Internal::stringArrayMetho dStringArrayArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
306 }; 310 };
(...skipping 14 matching lines...) Expand all
321 TestTypedefsV8Internal::constructor(info); 325 TestTypedefsV8Internal::constructor(info);
322 } 326 }
323 327
324 static void installV8TestTypedefsTemplate(v8::Local<v8::FunctionTemplate> functi onTemplate, v8::Isolate* isolate) 328 static void installV8TestTypedefsTemplate(v8::Local<v8::FunctionTemplate> functi onTemplate, v8::Isolate* isolate)
325 { 329 {
326 functionTemplate->ReadOnlyPrototype(); 330 functionTemplate->ReadOnlyPrototype();
327 331
328 v8::Local<v8::Signature> defaultSignature; 332 v8::Local<v8::Signature> defaultSignature;
329 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func tionTemplate, "TestTypedefs", v8::Local<v8::FunctionTemplate>(), V8TestTypedefs: :internalFieldCount, 333 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func tionTemplate, "TestTypedefs", v8::Local<v8::FunctionTemplate>(), V8TestTypedefs: :internalFieldCount,
330 V8TestTypedefsAttributes, WTF_ARRAY_LENGTH(V8TestTypedefsAttributes), 334 V8TestTypedefsAttributes, WTF_ARRAY_LENGTH(V8TestTypedefsAttributes),
331 0, 0, 335 V8TestTypedefsAccessors, WTF_ARRAY_LENGTH(V8TestTypedefsAccessors),
332 V8TestTypedefsMethods, WTF_ARRAY_LENGTH(V8TestTypedefsMethods)); 336 V8TestTypedefsMethods, WTF_ARRAY_LENGTH(V8TestTypedefsMethods));
333 functionTemplate->SetCallHandler(V8TestTypedefs::constructorCallback); 337 functionTemplate->SetCallHandler(V8TestTypedefs::constructorCallback);
334 functionTemplate->SetLength(1); 338 functionTemplate->SetLength(1);
335 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate(); 339 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate();
336 ALLOW_UNUSED_LOCAL(instanceTemplate); 340 ALLOW_UNUSED_LOCAL(instanceTemplate);
337 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate(); 341 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate();
338 ALLOW_UNUSED_LOCAL(prototypeTemplate); 342 ALLOW_UNUSED_LOCAL(prototypeTemplate);
339 343
340 // Custom toString template 344 // Custom toString template
341 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate()); 345 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate());
(...skipping 23 matching lines...) Expand all
365 { 369 {
366 scriptWrappable->toImpl<TestTypedefs>()->ref(); 370 scriptWrappable->toImpl<TestTypedefs>()->ref();
367 } 371 }
368 372
369 void V8TestTypedefs::derefObject(ScriptWrappable* scriptWrappable) 373 void V8TestTypedefs::derefObject(ScriptWrappable* scriptWrappable)
370 { 374 {
371 scriptWrappable->toImpl<TestTypedefs>()->deref(); 375 scriptWrappable->toImpl<TestTypedefs>()->deref();
372 } 376 }
373 377
374 } // namespace blink 378 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/core/V8TestObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698