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

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

Issue 1226203012: Revert of bindings: Makes almost all attributes accessor-type properties. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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 21 matching lines...) Expand all
32 #pragma clang diagnostic pop 32 #pragma clang diagnostic pop
33 #endif 33 #endif
34 34
35 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac eWillBeGarbageCollected.h. 35 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac eWillBeGarbageCollected.h.
36 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in 36 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in
37 // bindings/core/v8/ScriptWrappable.h. 37 // bindings/core/v8/ScriptWrappable.h.
38 const WrapperTypeInfo& TestInterfaceWillBeGarbageCollected::s_wrapperTypeInfo = V8TestInterfaceWillBeGarbageCollected::wrapperTypeInfo; 38 const WrapperTypeInfo& TestInterfaceWillBeGarbageCollected::s_wrapperTypeInfo = V8TestInterfaceWillBeGarbageCollected::wrapperTypeInfo;
39 39
40 namespace TestInterfaceWillBeGarbageCollectedV8Internal { 40 namespace TestInterfaceWillBeGarbageCollectedV8Internal {
41 41
42 static void attr1AttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info ) 42 static void attr1AttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info )
43 { 43 {
44 v8::Local<v8::Object> holder = info.Holder(); 44 v8::Local<v8::Object> holder = info.Holder();
45 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl ected::toImpl(holder); 45 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl ected::toImpl(holder);
46 v8SetReturnValueFast(info, WTF::getPtr(impl->attr1()), impl); 46 v8SetReturnValueFast(info, WTF::getPtr(impl->attr1()), impl);
47 } 47 }
48 48
49 static void attr1AttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Valu e>& info) 49 static void attr1AttributeGetterCallback(v8::Local<v8::Name>, const v8::Property CallbackInfo<v8::Value>& info)
50 { 50 {
51 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 51 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
52 TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeGetter(info); 52 TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeGetter(info);
53 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 53 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
54 } 54 }
55 55
56 static void attr1AttributeSetter(v8::Local<v8::Value> v8Value, const v8::Functio nCallbackInfo<v8::Value>& info) 56 static void attr1AttributeSetter(v8::Local<v8::Value> v8Value, const v8::Propert yCallbackInfo<void>& info)
57 { 57 {
58 v8::Local<v8::Object> holder = info.Holder(); 58 v8::Local<v8::Object> holder = info.Holder();
59 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl ected::toImpl(holder); 59 TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageColl ected::toImpl(holder);
60 TestInterfaceWillBeGarbageCollected* cppValue = V8TestInterfaceWillBeGarbage Collected::toImplWithTypeCheck(info.GetIsolate(), v8Value); 60 TestInterfaceWillBeGarbageCollected* cppValue = V8TestInterfaceWillBeGarbage Collected::toImplWithTypeCheck(info.GetIsolate(), v8Value);
61 impl->setAttr1(WTF::getPtr(cppValue)); 61 impl->setAttr1(WTF::getPtr(cppValue));
62 } 62 }
63 63
64 static void attr1AttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Valu e>& info) 64 static void attr1AttributeSetterCallback(v8::Local<v8::Name>, v8::Local<v8::Valu e> v8Value, const v8::PropertyCallbackInfo<void>& info)
65 { 65 {
66 v8::Local<v8::Value> v8Value = info[0];
67 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 66 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
68 TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetter(v8Value, info); 67 TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetter(v8Value, info);
69 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 68 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
70 } 69 }
71 70
72 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 71 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
73 { 72 {
74 if (UNLIKELY(info.Length() < 1)) { 73 if (UNLIKELY(info.Length() < 1)) {
75 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "func", "TestInterfaceWillBeGarbageCollected", 1, info.Length() ), info.GetIsolate()); 74 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "func", "TestInterfaceWillBeGarbageCollected", 1, info.Length() ), info.GetIsolate());
76 return; 75 return;
(...skipping 26 matching lines...) Expand all
103 return; 102 return;
104 } 103 }
105 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface WillBeGarbageCollected::create(str); 104 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface WillBeGarbageCollected::create(str);
106 v8::Local<v8::Object> wrapper = info.Holder(); 105 v8::Local<v8::Object> wrapper = info.Holder();
107 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceWillBeGarbageC ollected::wrapperTypeInfo, wrapper); 106 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceWillBeGarbageC ollected::wrapperTypeInfo, wrapper);
108 v8SetReturnValue(info, wrapper); 107 v8SetReturnValue(info, wrapper);
109 } 108 }
110 109
111 } // namespace TestInterfaceWillBeGarbageCollectedV8Internal 110 } // namespace TestInterfaceWillBeGarbageCollectedV8Internal
112 111
113 static const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceWillBeGarb ageCollectedAccessors[] = { 112 // Suppress warning: global constructors, because AttributeConfiguration is triv ial
114 {"attr1", TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeGette rCallback, TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetterCa llback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::DontDelete) , V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOM Configuration::CheckHolder}, 113 // and does not depend on another global objects.
114 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG)
115 #pragma clang diagnostic push
116 #pragma clang diagnostic ignored "-Wglobal-constructors"
117 #endif
118 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceWillBeGar bageCollectedAttributes[] = {
119 {"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, V8DOMConfiguration::CheckHolder},
115 }; 120 };
121 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG)
122 #pragma clang diagnostic pop
123 #endif
116 124
117 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv ial 125 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv ial
118 // and does not depend on another global objects. 126 // and does not depend on another global objects.
119 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) 127 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG)
120 #pragma clang diagnostic push 128 #pragma clang diagnostic push
121 #pragma clang diagnostic ignored "-Wglobal-constructors" 129 #pragma clang diagnostic ignored "-Wglobal-constructors"
122 #endif 130 #endif
123 const WrapperTypeInfo V8TestInterfaceWillBeGarbageCollectedConstructor::wrapperT ypeInfo = { gin::kEmbedderBlink, V8TestInterfaceWillBeGarbageCollectedConstructo r::domTemplate, V8TestInterfaceWillBeGarbageCollected::refObject, V8TestInterfac eWillBeGarbageCollected::derefObject, V8TestInterfaceWillBeGarbageCollected::tra ce, 0, 0, V8TestInterfaceWillBeGarbageCollected::preparePrototypeObject, V8TestI nterfaceWillBeGarbageCollected::installConditionallyEnabledProperties, "TestInte rfaceWillBeGarbageCollected", 0, WrapperTypeInfo::WrapperTypeObjectPrototype, Wr apperTypeInfo::ObjectClassId, WrapperTypeInfo::InheritFromEventTarget, WrapperTy peInfo::Independent, WrapperTypeInfo::WillBeGarbageCollectedObject }; 131 const WrapperTypeInfo V8TestInterfaceWillBeGarbageCollectedConstructor::wrapperT ypeInfo = { gin::kEmbedderBlink, V8TestInterfaceWillBeGarbageCollectedConstructo r::domTemplate, V8TestInterfaceWillBeGarbageCollected::refObject, V8TestInterfac eWillBeGarbageCollected::derefObject, V8TestInterfaceWillBeGarbageCollected::tra ce, 0, 0, V8TestInterfaceWillBeGarbageCollected::preparePrototypeObject, V8TestI nterfaceWillBeGarbageCollected::installConditionallyEnabledProperties, "TestInte rfaceWillBeGarbageCollected", 0, WrapperTypeInfo::WrapperTypeObjectPrototype, Wr apperTypeInfo::ObjectClassId, WrapperTypeInfo::InheritFromEventTarget, WrapperTy peInfo::Independent, WrapperTypeInfo::WillBeGarbageCollectedObject };
124 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) 132 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG)
125 #pragma clang diagnostic pop 133 #pragma clang diagnostic pop
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 193
186 TestInterfaceWillBeGarbageCollectedV8Internal::constructor(info); 194 TestInterfaceWillBeGarbageCollectedV8Internal::constructor(info);
187 } 195 }
188 196
189 static void installV8TestInterfaceWillBeGarbageCollectedTemplate(v8::Local<v8::F unctionTemplate> functionTemplate, v8::Isolate* isolate) 197 static void installV8TestInterfaceWillBeGarbageCollectedTemplate(v8::Local<v8::F unctionTemplate> functionTemplate, v8::Isolate* isolate)
190 { 198 {
191 functionTemplate->ReadOnlyPrototype(); 199 functionTemplate->ReadOnlyPrototype();
192 200
193 v8::Local<v8::Signature> defaultSignature; 201 v8::Local<v8::Signature> defaultSignature;
194 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func tionTemplate, "TestInterfaceWillBeGarbageCollected", V8EventTarget::domTemplate( isolate), V8TestInterfaceWillBeGarbageCollected::internalFieldCount, 202 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func tionTemplate, "TestInterfaceWillBeGarbageCollected", V8EventTarget::domTemplate( isolate), V8TestInterfaceWillBeGarbageCollected::internalFieldCount,
203 V8TestInterfaceWillBeGarbageCollectedAttributes, WTF_ARRAY_LENGTH(V8Test InterfaceWillBeGarbageCollectedAttributes),
195 0, 0, 204 0, 0,
196 V8TestInterfaceWillBeGarbageCollectedAccessors, WTF_ARRAY_LENGTH(V8TestI nterfaceWillBeGarbageCollectedAccessors),
197 0, 0); 205 0, 0);
198 functionTemplate->SetCallHandler(V8TestInterfaceWillBeGarbageCollected::cons tructorCallback); 206 functionTemplate->SetCallHandler(V8TestInterfaceWillBeGarbageCollected::cons tructorCallback);
199 functionTemplate->SetLength(1); 207 functionTemplate->SetLength(1);
200 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate(); 208 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate();
201 ALLOW_UNUSED_LOCAL(instanceTemplate); 209 ALLOW_UNUSED_LOCAL(instanceTemplate);
202 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate(); 210 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate();
203 ALLOW_UNUSED_LOCAL(prototypeTemplate); 211 ALLOW_UNUSED_LOCAL(prototypeTemplate);
204 const V8DOMConfiguration::MethodConfiguration funcMethodConfiguration = { 212 const V8DOMConfiguration::MethodConfiguration funcMethodConfiguration = {
205 "func", TestInterfaceWillBeGarbageCollectedV8Internal::funcMethodCallbac k, 0, 1, V8DOMConfiguration::ExposedToAllScripts, 213 "func", TestInterfaceWillBeGarbageCollectedV8Internal::funcMethodCallbac k, 0, 1, V8DOMConfiguration::ExposedToAllScripts,
206 }; 214 };
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 } 246 }
239 247
240 void V8TestInterfaceWillBeGarbageCollected::derefObject(ScriptWrappable* scriptW rappable) 248 void V8TestInterfaceWillBeGarbageCollected::derefObject(ScriptWrappable* scriptW rappable)
241 { 249 {
242 #if !ENABLE(OILPAN) 250 #if !ENABLE(OILPAN)
243 scriptWrappable->toImpl<TestInterfaceWillBeGarbageCollected>()->deref(); 251 scriptWrappable->toImpl<TestInterfaceWillBeGarbageCollected>()->deref();
244 #endif 252 #endif
245 } 253 }
246 254
247 } // namespace blink 255 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698