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

Side by Side Diff: Source/bindings/tests/results/core/V8TestInterfaceWillBeGarbageCollected.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 "V8TestInterfaceWillBeGarbageCollected.h" 8 #include "V8TestInterfaceWillBeGarbageCollected.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 V8TestInterfaceWillBeGarbageCollected::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestInterfaceWillBeGarbageCollected::domTemplate, V8Test InterfaceWillBeGarbageCollected::refObject, V8TestInterfaceWillBeGarbageCollecte d::derefObject, V8TestInterfaceWillBeGarbageCollected::trace, 0, 0, V8TestInterf aceWillBeGarbageCollected::installConditionallyEnabledMethods, V8TestInterfaceWi llBeGarbageCollected::installConditionallyEnabledProperties, &V8EventTarget::wra pperTypeInfo, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::Obje ctClassId, WrapperTypeInfo::InheritFromEventTarget, WrapperTypeInfo::Independent , WrapperTypeInfo::WillBeGarbageCollectedObject }; 25 const WrapperTypeInfo V8TestInterfaceWillBeGarbageCollected::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestInterfaceWillBeGarbageCollected::domTemplate, V8Test InterfaceWillBeGarbageCollected::refObject, V8TestInterfaceWillBeGarbageCollecte d::derefObject, V8TestInterfaceWillBeGarbageCollected::trace, 0, 0, V8TestInterf aceWillBeGarbageCollected::installConditionallyEnabledMethods, V8TestInterfaceWi llBeGarbageCollected::installConditionallyEnabledProperties, &V8EventTarget::wra pperTypeInfo, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::Obje ctClassId, WrapperTypeInfo::InheritFromEventTarget, WrapperTypeInfo::Independent , WrapperTypeInfo::WillBeGarbageCollectedObject };
26 26
27 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac eWillBeGarbageCollected.h. 27 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac eWillBeGarbageCollected.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& TestInterfaceWillBeGarbageCollected::s_wrapperTypeInfo = V8TestInterfaceWillBeGarbageCollected::wrapperTypeInfo; 30 const WrapperTypeInfo& TestInterfaceWillBeGarbageCollected::s_wrapperTypeInfo = V8TestInterfaceWillBeGarbageCollected::wrapperTypeInfo;
31 31
32 namespace TestInterfaceWillBeGarbageCollectedV8Internal { 32 namespace TestInterfaceWillBeGarbageCollectedV8Internal {
33 33
34 static void attr1AttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info ) 34 static void attr1AttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info )
35 { 35 {
36 v8::Local<v8::Object> holder = info.Holder(); 36 v8::Local<v8::Object> holder = info.Holder();
37 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl ected::toImpl(holder); 37 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl ected::toImpl(holder);
38 v8SetReturnValueFast(info, WTF::getPtr(impl->attr1()), impl); 38 v8SetReturnValueFast(info, WTF::getPtr(impl->attr1()), impl);
39 } 39 }
40 40
41 static void attr1AttributeGetterCallback(v8::Local<v8::String>, const v8::Proper tyCallbackInfo<v8::Value>& info) 41 static void attr1AttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Valu e>& info)
42 { 42 {
43 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 43 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
44 TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeGetter(info); 44 TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeGetter(info);
45 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 45 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
46 } 46 }
47 47
48 static void attr1AttributeSetter(v8::Local<v8::Value> v8Value, const v8::Propert yCallbackInfo<void>& info) 48 static void attr1AttributeSetter(v8::Local<v8::Value> v8Value, const v8::Functio nCallbackInfo<v8::Value>& info)
49 { 49 {
50 v8::Local<v8::Object> holder = info.Holder(); 50 v8::Local<v8::Object> holder = info.Holder();
51 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl ected::toImpl(holder); 51 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl ected::toImpl(holder);
52 TestInterfaceWillBeGarbageCollected* cppValue = V8TestInterfaceWillBeGarbage Collected::toImplWithTypeCheck(info.GetIsolate(), v8Value); 52 TestInterfaceWillBeGarbageCollected* cppValue = V8TestInterfaceWillBeGarbage Collected::toImplWithTypeCheck(info.GetIsolate(), v8Value);
53 impl->setAttr1(WTF::getPtr(cppValue)); 53 impl->setAttr1(WTF::getPtr(cppValue));
54 } 54 }
55 55
56 static void attr1AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va lue> v8Value, const v8::PropertyCallbackInfo<void>& info) 56 static void attr1AttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Valu e>& info)
57 { 57 {
58 v8::Local<v8::Value> v8Value = info[0];
58 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 59 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
59 TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetter(v8Value, info); 60 TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetter(v8Value, info);
60 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 61 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
61 } 62 }
62 63
63 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 64 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
64 { 65 {
65 if (UNLIKELY(info.Length() < 1)) { 66 if (UNLIKELY(info.Length() < 1)) {
66 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "func", "TestInterfaceWillBeGarbageCollected", 1, info.Length() ), info.GetIsolate()); 67 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "func", "TestInterfaceWillBeGarbageCollected", 1, info.Length() ), info.GetIsolate());
67 return; 68 return;
(...skipping 26 matching lines...) Expand all
94 return; 95 return;
95 } 96 }
96 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface WillBeGarbageCollected::create(str); 97 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface WillBeGarbageCollected::create(str);
97 v8::Local<v8::Object> wrapper = info.Holder(); 98 v8::Local<v8::Object> wrapper = info.Holder();
98 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceWillBeGarbageC ollected::wrapperTypeInfo, wrapper); 99 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceWillBeGarbageC ollected::wrapperTypeInfo, wrapper);
99 v8SetReturnValue(info, wrapper); 100 v8SetReturnValue(info, wrapper);
100 } 101 }
101 102
102 } // namespace TestInterfaceWillBeGarbageCollectedV8Internal 103 } // namespace TestInterfaceWillBeGarbageCollectedV8Internal
103 104
104 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceWillBeGar bageCollectedAttributes[] = { 105 static const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceWillBeGarb ageCollectedAccessors[] = {
105 {"attr1", TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeGette rCallback, TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetterCa llback, 0, 0, 0, static_cast<v8::AccessControl>(v8::PROHIBITS_OVERWRITING), stat ic_cast<v8::PropertyAttribute>(v8::DontDelete), V8DOMConfiguration::ExposedToAll Scripts, V8DOMConfiguration::OnInstance}, 106 {"attr1", TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeGette rCallback, TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetterCa llback, 0, 0, 0, static_cast<v8::AccessControl>(v8::PROHIBITS_OVERWRITING), stat ic_cast<v8::PropertyAttribute>(v8::DontDelete), V8DOMConfiguration::ExposedToAll Scripts},
106 }; 107 };
107 108
108 const WrapperTypeInfo V8TestInterfaceWillBeGarbageCollectedConstructor::wrapperT ypeInfo = { gin::kEmbedderBlink, V8TestInterfaceWillBeGarbageCollectedConstructo r::domTemplate, V8TestInterfaceWillBeGarbageCollected::refObject, V8TestInterfac eWillBeGarbageCollected::derefObject, V8TestInterfaceWillBeGarbageCollected::tra ce, 0, 0, V8TestInterfaceWillBeGarbageCollected::installConditionallyEnabledMeth ods, V8TestInterfaceWillBeGarbageCollected::installConditionallyEnabledPropertie s, 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassI d, WrapperTypeInfo::InheritFromEventTarget, WrapperTypeInfo::Independent, Wrappe rTypeInfo::WillBeGarbageCollectedObject }; 109 const WrapperTypeInfo V8TestInterfaceWillBeGarbageCollectedConstructor::wrapperT ypeInfo = { gin::kEmbedderBlink, V8TestInterfaceWillBeGarbageCollectedConstructo r::domTemplate, V8TestInterfaceWillBeGarbageCollected::refObject, V8TestInterfac eWillBeGarbageCollected::derefObject, V8TestInterfaceWillBeGarbageCollected::tra ce, 0, 0, V8TestInterfaceWillBeGarbageCollected::installConditionallyEnabledMeth ods, V8TestInterfaceWillBeGarbageCollected::installConditionallyEnabledPropertie s, 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassI d, WrapperTypeInfo::InheritFromEventTarget, WrapperTypeInfo::Independent, Wrappe rTypeInfo::WillBeGarbageCollectedObject };
109 110
110 static void V8TestInterfaceWillBeGarbageCollectedConstructorCallback(const v8::F unctionCallbackInfo<v8::Value>& info) 111 static void V8TestInterfaceWillBeGarbageCollectedConstructorCallback(const v8::F unctionCallbackInfo<v8::Value>& info)
111 { 112 {
112 if (!info.IsConstructCall()) { 113 if (!info.IsConstructCall()) {
113 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c onstructorNotCallableAsFunction("TestInterface")); 114 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c onstructorNotCallableAsFunction("TestInterface"));
114 return; 115 return;
115 } 116 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 168
168 TestInterfaceWillBeGarbageCollectedV8Internal::constructor(info); 169 TestInterfaceWillBeGarbageCollectedV8Internal::constructor(info);
169 } 170 }
170 171
171 static void installV8TestInterfaceWillBeGarbageCollectedTemplate(v8::Local<v8::F unctionTemplate> functionTemplate, v8::Isolate* isolate) 172 static void installV8TestInterfaceWillBeGarbageCollectedTemplate(v8::Local<v8::F unctionTemplate> functionTemplate, v8::Isolate* isolate)
172 { 173 {
173 functionTemplate->ReadOnlyPrototype(); 174 functionTemplate->ReadOnlyPrototype();
174 175
175 v8::Local<v8::Signature> defaultSignature; 176 v8::Local<v8::Signature> defaultSignature;
176 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func tionTemplate, "TestInterfaceWillBeGarbageCollected", V8EventTarget::domTemplate( isolate), V8TestInterfaceWillBeGarbageCollected::internalFieldCount, 177 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func tionTemplate, "TestInterfaceWillBeGarbageCollected", V8EventTarget::domTemplate( isolate), V8TestInterfaceWillBeGarbageCollected::internalFieldCount,
177 V8TestInterfaceWillBeGarbageCollectedAttributes, WTF_ARRAY_LENGTH(V8Test InterfaceWillBeGarbageCollectedAttributes),
178 0, 0, 178 0, 0,
179 V8TestInterfaceWillBeGarbageCollectedAccessors, WTF_ARRAY_LENGTH(V8TestI nterfaceWillBeGarbageCollectedAccessors),
179 0, 0); 180 0, 0);
180 functionTemplate->SetCallHandler(V8TestInterfaceWillBeGarbageCollected::cons tructorCallback); 181 functionTemplate->SetCallHandler(V8TestInterfaceWillBeGarbageCollected::cons tructorCallback);
181 functionTemplate->SetLength(1); 182 functionTemplate->SetLength(1);
182 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate(); 183 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate();
183 ALLOW_UNUSED_LOCAL(instanceTemplate); 184 ALLOW_UNUSED_LOCAL(instanceTemplate);
184 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate(); 185 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate();
185 ALLOW_UNUSED_LOCAL(prototypeTemplate); 186 ALLOW_UNUSED_LOCAL(prototypeTemplate);
186 const V8DOMConfiguration::MethodConfiguration funcMethodConfiguration = { 187 const V8DOMConfiguration::MethodConfiguration funcMethodConfiguration = {
187 "func", TestInterfaceWillBeGarbageCollectedV8Internal::funcMethodCallbac k, 0, 1, V8DOMConfiguration::ExposedToAllScripts, 188 "func", TestInterfaceWillBeGarbageCollectedV8Internal::funcMethodCallbac k, 0, 1, V8DOMConfiguration::ExposedToAllScripts,
188 }; 189 };
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 } 221 }
221 222
222 void V8TestInterfaceWillBeGarbageCollected::derefObject(ScriptWrappable* scriptW rappable) 223 void V8TestInterfaceWillBeGarbageCollected::derefObject(ScriptWrappable* scriptW rappable)
223 { 224 {
224 #if !ENABLE(OILPAN) 225 #if !ENABLE(OILPAN)
225 scriptWrappable->toImpl<TestInterfaceWillBeGarbageCollected>()->deref(); 226 scriptWrappable->toImpl<TestInterfaceWillBeGarbageCollected>()->deref();
226 #endif 227 #endif
227 } 228 }
228 229
229 } // namespace blink 230 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/core/V8TestInterfaceNode.cpp ('k') | Source/bindings/tests/results/core/V8TestNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698