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

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

Issue 962513002: IDL: Add test for attribute that "inherits its getter" (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « Source/bindings/tests/idls/core/TestInterfaceNode.idl ('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 "V8TestInterfaceNode.h" 8 #include "V8TestInterfaceNode.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 16 matching lines...) Expand all
27 27
28 const WrapperTypeInfo V8TestInterfaceNode::wrapperTypeInfo = { gin::kEmbedderBli nk, V8TestInterfaceNode::domTemplate, V8TestInterfaceNode::refObject, V8TestInte rfaceNode::derefObject, V8TestInterfaceNode::trace, 0, 0, V8TestInterfaceNode::i nstallConditionallyEnabledMethods, V8TestInterfaceNode::installConditionallyEnab ledProperties, &V8Node::wrapperTypeInfo, WrapperTypeInfo::WrapperTypeObjectProto type, WrapperTypeInfo::NodeClassId, WrapperTypeInfo::InheritFromEventTarget, Wra pperTypeInfo::Dependent, WrapperTypeInfo::WillBeGarbageCollectedObject }; 28 const WrapperTypeInfo V8TestInterfaceNode::wrapperTypeInfo = { gin::kEmbedderBli nk, V8TestInterfaceNode::domTemplate, V8TestInterfaceNode::refObject, V8TestInte rfaceNode::derefObject, V8TestInterfaceNode::trace, 0, 0, V8TestInterfaceNode::i nstallConditionallyEnabledMethods, V8TestInterfaceNode::installConditionallyEnab ledProperties, &V8Node::wrapperTypeInfo, WrapperTypeInfo::WrapperTypeObjectProto type, WrapperTypeInfo::NodeClassId, WrapperTypeInfo::InheritFromEventTarget, Wra pperTypeInfo::Dependent, WrapperTypeInfo::WillBeGarbageCollectedObject };
29 29
30 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac eNode.h. 30 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac eNode.h.
31 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in 31 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in
32 // bindings/core/v8/ScriptWrappable.h. 32 // bindings/core/v8/ScriptWrappable.h.
33 const WrapperTypeInfo& TestInterfaceNode::s_wrapperTypeInfo = V8TestInterfaceNod e::wrapperTypeInfo; 33 const WrapperTypeInfo& TestInterfaceNode::s_wrapperTypeInfo = V8TestInterfaceNod e::wrapperTypeInfo;
34 34
35 namespace TestInterfaceNodeV8Internal { 35 namespace TestInterfaceNodeV8Internal {
36 36
37 static void nodeNameAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& i nfo)
38 {
39 v8::Local<v8::Object> holder = info.Holder();
40 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
41 v8SetReturnValueString(info, impl->nodeName(), info.GetIsolate());
42 }
43
44 static void nodeNameAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro pertyCallbackInfo<v8::Value>& info)
45 {
46 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
47 TestInterfaceNodeV8Internal::nodeNameAttributeGetter(info);
48 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
49 }
50
51 static void nodeNameAttributeSetter(v8::Local<v8::Value> v8Value, const v8::Prop ertyCallbackInfo<void>& info)
52 {
53 v8::Local<v8::Object> holder = info.Holder();
54 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
55 V8StringResource<> cppValue = v8Value;
56 if (!cppValue.prepare())
57 return;
58 impl->setNodeName(cppValue);
59 }
60
61 static void nodeNameAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8: :Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
62 {
63 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
64 TestInterfaceNodeV8Internal::nodeNameAttributeSetter(v8Value, info);
65 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
66 }
67
37 static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va lue>& info) 68 static void stringAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va lue>& info)
38 { 69 {
39 v8::Local<v8::Object> holder = info.Holder(); 70 v8::Local<v8::Object> holder = info.Holder();
40 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder); 71 TestInterfaceNode* impl = V8TestInterfaceNode::toImpl(holder);
41 v8SetReturnValueString(info, impl->stringAttribute(), info.GetIsolate()); 72 v8SetReturnValueString(info, impl->stringAttribute(), info.GetIsolate());
42 } 73 }
43 74
44 static void stringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) 75 static void stringAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
45 { 76 {
46 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 77 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodCall backForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info) 308 static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodCall backForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
278 { 309 {
279 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 310 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
280 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodOptiona lBooleanArgMethodForMainWorld(info); 311 TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodOptiona lBooleanArgMethodForMainWorld(info);
281 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 312 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
282 } 313 }
283 314
284 } // namespace TestInterfaceNodeV8Internal 315 } // namespace TestInterfaceNodeV8Internal
285 316
286 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceNodeAttri butes[] = { 317 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceNodeAttri butes[] = {
318 {"nodeName", TestInterfaceNodeV8Internal::nodeNameAttributeGetterCallback, T estInterfaceNodeV8Internal::nodeNameAttributeSetterCallback, 0, 0, 0, static_cas t<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance},
287 {"stringAttribute", TestInterfaceNodeV8Internal::stringAttributeAttributeGet terCallback, TestInterfaceNodeV8Internal::stringAttributeAttributeSetterCallback , 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Property Attribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguratio n::OnInstance}, 319 {"stringAttribute", TestInterfaceNodeV8Internal::stringAttributeAttributeGet terCallback, TestInterfaceNodeV8Internal::stringAttributeAttributeSetterCallback , 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Property Attribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguratio n::OnInstance},
288 {"readonlyTestInterfaceEmptyAttribute", TestInterfaceNodeV8Internal::readonl yTestInterfaceEmptyAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8: :AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DO MConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, 320 {"readonlyTestInterfaceEmptyAttribute", TestInterfaceNodeV8Internal::readonl yTestInterfaceEmptyAttributeAttributeGetterCallback, 0, 0, 0, 0, static_cast<v8: :AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DO MConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance},
289 {"eventHandlerAttribute", TestInterfaceNodeV8Internal::eventHandlerAttribute AttributeGetterCallback, TestInterfaceNodeV8Internal::eventHandlerAttributeAttri buteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static _cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, 321 {"eventHandlerAttribute", TestInterfaceNodeV8Internal::eventHandlerAttribute AttributeGetterCallback, TestInterfaceNodeV8Internal::eventHandlerAttributeAttri buteSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static _cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance},
290 {"perWorldBindingsReadonlyTestInterfaceEmptyAttribute", TestInterfaceNodeV8I nternal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallb ack, 0, TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyA ttributeAttributeGetterCallbackForMainWorld, 0, 0, static_cast<v8::AccessControl >(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration ::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, 322 {"perWorldBindingsReadonlyTestInterfaceEmptyAttribute", TestInterfaceNodeV8I nternal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallb ack, 0, TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyA ttributeAttributeGetterCallbackForMainWorld, 0, 0, static_cast<v8::AccessControl >(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration ::ExposedToAllScripts, V8DOMConfiguration::OnInstance},
291 {"reflectStringAttribute", TestInterfaceNodeV8Internal::reflectStringAttribu teAttributeGetterCallback, TestInterfaceNodeV8Internal::reflectStringAttributeAt tributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), sta tic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScrip ts, V8DOMConfiguration::OnInstance}, 323 {"reflectStringAttribute", TestInterfaceNodeV8Internal::reflectStringAttribu teAttributeGetterCallback, TestInterfaceNodeV8Internal::reflectStringAttributeAt tributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), sta tic_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScrip ts, V8DOMConfiguration::OnInstance},
292 {"reflectUrlStringAttribute", TestInterfaceNodeV8Internal::reflectUrlStringA ttributeAttributeGetterCallback, TestInterfaceNodeV8Internal::reflectUrlStringAt tributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFA ULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedT oAllScripts, V8DOMConfiguration::OnInstance}, 324 {"reflectUrlStringAttribute", TestInterfaceNodeV8Internal::reflectUrlStringA ttributeAttributeGetterCallback, TestInterfaceNodeV8Internal::reflectUrlStringAt tributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFA ULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedT oAllScripts, V8DOMConfiguration::OnInstance},
293 }; 325 };
294 326
295 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceNodeMethods[ ] = { 327 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceNodeMethods[ ] = {
296 {"testInterfaceEmptyMethod", TestInterfaceNodeV8Internal::testInterfaceEmpty MethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 328 {"testInterfaceEmptyMethod", TestInterfaceNodeV8Internal::testInterfaceEmpty MethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 } 376 }
345 377
346 void V8TestInterfaceNode::derefObject(ScriptWrappable* scriptWrappable) 378 void V8TestInterfaceNode::derefObject(ScriptWrappable* scriptWrappable)
347 { 379 {
348 #if !ENABLE(OILPAN) 380 #if !ENABLE(OILPAN)
349 scriptWrappable->toImpl<TestInterfaceNode>()->deref(); 381 scriptWrappable->toImpl<TestInterfaceNode>()->deref();
350 #endif 382 #endif
351 } 383 }
352 384
353 } // namespace blink 385 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/tests/idls/core/TestInterfaceNode.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698