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

Side by Side Diff: Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.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
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 "V8TestInterfaceEventInitConstructor.h" 8 #include "V8TestInterfaceEventInitConstructor.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 13 matching lines...) Expand all
24 24
25 const WrapperTypeInfo V8TestInterfaceEventInitConstructor::wrapperTypeInfo = { g in::kEmbedderBlink, V8TestInterfaceEventInitConstructor::domTemplate, V8TestInte rfaceEventInitConstructor::refObject, V8TestInterfaceEventInitConstructor::deref Object, V8TestInterfaceEventInitConstructor::trace, 0, 0, V8TestInterfaceEventIn itConstructor::installConditionallyEnabledMethods, V8TestInterfaceEventInitConst ructor::installConditionallyEnabledProperties, &V8Event::wrapperTypeInfo, Wrappe rTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassId, WrapperTy peInfo::NotInheritFromEventTarget, WrapperTypeInfo::Independent, WrapperTypeInfo ::WillBeGarbageCollectedObject }; 25 const WrapperTypeInfo V8TestInterfaceEventInitConstructor::wrapperTypeInfo = { g in::kEmbedderBlink, V8TestInterfaceEventInitConstructor::domTemplate, V8TestInte rfaceEventInitConstructor::refObject, V8TestInterfaceEventInitConstructor::deref Object, V8TestInterfaceEventInitConstructor::trace, 0, 0, V8TestInterfaceEventIn itConstructor::installConditionallyEnabledMethods, V8TestInterfaceEventInitConst ructor::installConditionallyEnabledProperties, &V8Event::wrapperTypeInfo, Wrappe rTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassId, WrapperTy peInfo::NotInheritFromEventTarget, WrapperTypeInfo::Independent, WrapperTypeInfo ::WillBeGarbageCollectedObject };
26 26
27 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac eEventInitConstructor.h. 27 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac eEventInitConstructor.h.
28 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in 28 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in
29 // bindings/core/v8/ScriptWrappable.h. 29 // bindings/core/v8/ScriptWrappable.h.
30 const WrapperTypeInfo& TestInterfaceEventInitConstructor::s_wrapperTypeInfo = V8 TestInterfaceEventInitConstructor::wrapperTypeInfo; 30 const WrapperTypeInfo& TestInterfaceEventInitConstructor::s_wrapperTypeInfo = V8 TestInterfaceEventInitConstructor::wrapperTypeInfo;
31 31
32 namespace TestInterfaceEventInitConstructorV8Internal { 32 namespace TestInterfaceEventInitConstructorV8Internal {
33 33
34 static void readonlyStringAttributeAttributeGetter(const v8::PropertyCallbackInf o<v8::Value>& info) 34 static void readonlyStringAttributeAttributeGetter(const v8::FunctionCallbackInf o<v8::Value>& info)
35 { 35 {
36 v8::Local<v8::Object> holder = info.Holder(); 36 v8::Local<v8::Object> holder = info.Holder();
37 TestInterfaceEventInitConstructor* impl = V8TestInterfaceEventInitConstructo r::toImpl(holder); 37 TestInterfaceEventInitConstructor* impl = V8TestInterfaceEventInitConstructo r::toImpl(holder);
38 v8SetReturnValueString(info, impl->readonlyStringAttribute(), info.GetIsolat e()); 38 v8SetReturnValueString(info, impl->readonlyStringAttribute(), info.GetIsolat e());
39 } 39 }
40 40
41 static void readonlyStringAttributeAttributeGetterCallback(v8::Local<v8::String> , const v8::PropertyCallbackInfo<v8::Value>& info) 41 static void readonlyStringAttributeAttributeGetterCallback(const v8::FunctionCal lbackInfo<v8::Value>& info)
42 { 42 {
43 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 43 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
44 TestInterfaceEventInitConstructorV8Internal::readonlyStringAttributeAttribut eGetter(info); 44 TestInterfaceEventInitConstructorV8Internal::readonlyStringAttributeAttribut eGetter(info);
45 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 45 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
46 } 46 }
47 47
48 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) 48 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
49 { 49 {
50 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceEventInitConstructor", info.Holder(), info.GetIsolate()); 50 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rfaceEventInitConstructor", info.Holder(), info.GetIsolate());
51 if (UNLIKELY(info.Length() < 2)) { 51 if (UNLIKELY(info.Length() < 2)) {
(...skipping 17 matching lines...) Expand all
69 return; 69 return;
70 } 70 }
71 RefPtrWillBeRawPtr<TestInterfaceEventInitConstructor> impl = TestInterfaceEv entInitConstructor::create(type, testInterfaceEventInit); 71 RefPtrWillBeRawPtr<TestInterfaceEventInitConstructor> impl = TestInterfaceEv entInitConstructor::create(type, testInterfaceEventInit);
72 v8::Local<v8::Object> wrapper = info.Holder(); 72 v8::Local<v8::Object> wrapper = info.Holder();
73 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceEventInitConst ructor::wrapperTypeInfo, wrapper); 73 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceEventInitConst ructor::wrapperTypeInfo, wrapper);
74 v8SetReturnValue(info, wrapper); 74 v8SetReturnValue(info, wrapper);
75 } 75 }
76 76
77 } // namespace TestInterfaceEventInitConstructorV8Internal 77 } // namespace TestInterfaceEventInitConstructorV8Internal
78 78
79 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceEventInit ConstructorAttributes[] = { 79 static const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceEventInitC onstructorAccessors[] = {
80 {"readonlyStringAttribute", TestInterfaceEventInitConstructorV8Internal::rea donlyStringAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessC ontrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigu ration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, 80 {"readonlyStringAttribute", TestInterfaceEventInitConstructorV8Internal::rea donlyStringAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8::AccessC ontrol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigu ration::ExposedToAllScripts},
81 }; 81 };
82 82
83 void V8TestInterfaceEventInitConstructor::constructorCallback(const v8::Function CallbackInfo<v8::Value>& info) 83 void V8TestInterfaceEventInitConstructor::constructorCallback(const v8::Function CallbackInfo<v8::Value>& info)
84 { 84 {
85 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "DOMConstructor"); 85 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "DOMConstructor");
86 if (!info.IsConstructCall()) { 86 if (!info.IsConstructCall()) {
87 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c onstructorNotCallableAsFunction("TestInterfaceEventInitConstructor")); 87 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c onstructorNotCallableAsFunction("TestInterfaceEventInitConstructor"));
88 return; 88 return;
89 } 89 }
90 90
91 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis tingObject) { 91 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis tingObject) {
92 v8SetReturnValue(info, info.Holder()); 92 v8SetReturnValue(info, info.Holder());
93 return; 93 return;
94 } 94 }
95 95
96 TestInterfaceEventInitConstructorV8Internal::constructor(info); 96 TestInterfaceEventInitConstructorV8Internal::constructor(info);
97 } 97 }
98 98
99 static void installV8TestInterfaceEventInitConstructorTemplate(v8::Local<v8::Fun ctionTemplate> functionTemplate, v8::Isolate* isolate) 99 static void installV8TestInterfaceEventInitConstructorTemplate(v8::Local<v8::Fun ctionTemplate> functionTemplate, v8::Isolate* isolate)
100 { 100 {
101 functionTemplate->ReadOnlyPrototype(); 101 functionTemplate->ReadOnlyPrototype();
102 102
103 v8::Local<v8::Signature> defaultSignature; 103 v8::Local<v8::Signature> defaultSignature;
104 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func tionTemplate, "TestInterfaceEventInitConstructor", V8Event::domTemplate(isolate) , V8TestInterfaceEventInitConstructor::internalFieldCount, 104 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func tionTemplate, "TestInterfaceEventInitConstructor", V8Event::domTemplate(isolate) , V8TestInterfaceEventInitConstructor::internalFieldCount,
105 V8TestInterfaceEventInitConstructorAttributes, WTF_ARRAY_LENGTH(V8TestIn terfaceEventInitConstructorAttributes),
106 0, 0, 105 0, 0,
106 V8TestInterfaceEventInitConstructorAccessors, WTF_ARRAY_LENGTH(V8TestInt erfaceEventInitConstructorAccessors),
107 0, 0); 107 0, 0);
108 functionTemplate->SetCallHandler(V8TestInterfaceEventInitConstructor::constr uctorCallback); 108 functionTemplate->SetCallHandler(V8TestInterfaceEventInitConstructor::constr uctorCallback);
109 functionTemplate->SetLength(2); 109 functionTemplate->SetLength(2);
110 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate(); 110 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate();
111 ALLOW_UNUSED_LOCAL(instanceTemplate); 111 ALLOW_UNUSED_LOCAL(instanceTemplate);
112 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate(); 112 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate();
113 ALLOW_UNUSED_LOCAL(prototypeTemplate); 113 ALLOW_UNUSED_LOCAL(prototypeTemplate);
114 114
115 // Custom toString template 115 // Custom toString template
116 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate()); 116 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate());
(...skipping 27 matching lines...) Expand all
144 } 144 }
145 145
146 void V8TestInterfaceEventInitConstructor::derefObject(ScriptWrappable* scriptWra ppable) 146 void V8TestInterfaceEventInitConstructor::derefObject(ScriptWrappable* scriptWra ppable)
147 { 147 {
148 #if !ENABLE(OILPAN) 148 #if !ENABLE(OILPAN)
149 scriptWrappable->toImpl<TestInterfaceEventInitConstructor>()->deref(); 149 scriptWrappable->toImpl<TestInterfaceEventInitConstructor>()->deref();
150 #endif 150 #endif
151 } 151 }
152 152
153 } // namespace blink 153 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698