OLD | NEW |
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 "V8TestInterfaceNamedConstructor.h" | 8 #include "V8TestInterfaceNamedConstructor.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
11 #include "bindings/core/v8/V8DOMConfiguration.h" | 11 #include "bindings/core/v8/V8DOMConfiguration.h" |
12 #include "bindings/core/v8/V8ObjectConstructor.h" | 12 #include "bindings/core/v8/V8ObjectConstructor.h" |
13 #include "core/dom/ContextFeatures.h" | 13 #include "core/dom/ContextFeatures.h" |
14 #include "core/dom/Document.h" | 14 #include "core/dom/Document.h" |
15 #include "core/frame/LocalDOMWindow.h" | 15 #include "core/frame/LocalDOMWindow.h" |
16 #include "platform/RuntimeEnabledFeatures.h" | 16 #include "platform/RuntimeEnabledFeatures.h" |
17 #include "platform/TraceEvent.h" | 17 #include "platform/TraceEvent.h" |
18 #include "wtf/GetPtr.h" | 18 #include "wtf/GetPtr.h" |
19 #include "wtf/RefPtr.h" | 19 #include "wtf/RefPtr.h" |
20 | 20 |
21 namespace blink { | 21 namespace blink { |
22 | 22 |
| 23 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv
ial |
| 24 // and does not depend on another global objects. |
| 25 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
| 26 #pragma clang diagnostic push |
| 27 #pragma clang diagnostic ignored "-Wglobal-constructors" |
| 28 #endif |
23 const WrapperTypeInfo V8TestInterfaceNamedConstructor::wrapperTypeInfo = { gin::
kEmbedderBlink, V8TestInterfaceNamedConstructor::domTemplate, V8TestInterfaceNam
edConstructor::refObject, V8TestInterfaceNamedConstructor::derefObject, V8TestIn
terfaceNamedConstructor::trace, V8TestInterfaceNamedConstructor::toActiveDOMObje
ct, 0, V8TestInterfaceNamedConstructor::preparePrototypeObject, V8TestInterfaceN
amedConstructor::installConditionallyEnabledProperties, "TestInterfaceNamedConst
ructor", 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::Object
ClassId, WrapperTypeInfo::NotInheritFromEventTarget, WrapperTypeInfo::Dependent,
WrapperTypeInfo::RefCountedObject }; | 29 const WrapperTypeInfo V8TestInterfaceNamedConstructor::wrapperTypeInfo = { gin::
kEmbedderBlink, V8TestInterfaceNamedConstructor::domTemplate, V8TestInterfaceNam
edConstructor::refObject, V8TestInterfaceNamedConstructor::derefObject, V8TestIn
terfaceNamedConstructor::trace, V8TestInterfaceNamedConstructor::toActiveDOMObje
ct, 0, V8TestInterfaceNamedConstructor::preparePrototypeObject, V8TestInterfaceN
amedConstructor::installConditionallyEnabledProperties, "TestInterfaceNamedConst
ructor", 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::Object
ClassId, WrapperTypeInfo::NotInheritFromEventTarget, WrapperTypeInfo::Dependent,
WrapperTypeInfo::RefCountedObject }; |
| 30 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
| 31 #pragma clang diagnostic pop |
| 32 #endif |
24 | 33 |
25 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac
eNamedConstructor.h. | 34 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac
eNamedConstructor.h. |
26 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in | 35 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in |
27 // bindings/core/v8/ScriptWrappable.h. | 36 // bindings/core/v8/ScriptWrappable.h. |
28 const WrapperTypeInfo& TestInterfaceNamedConstructor::s_wrapperTypeInfo = V8Test
InterfaceNamedConstructor::wrapperTypeInfo; | 37 const WrapperTypeInfo& TestInterfaceNamedConstructor::s_wrapperTypeInfo = V8Test
InterfaceNamedConstructor::wrapperTypeInfo; |
29 | 38 |
30 namespace TestInterfaceNamedConstructorV8Internal { | 39 namespace TestInterfaceNamedConstructorV8Internal { |
31 | 40 |
32 template<class CallbackInfo> | 41 template<class CallbackInfo> |
33 static bool TestInterfaceNamedConstructorCreateDataProperty(v8::Local<v8::Name>
name, v8::Local<v8::Value> v8Value, const CallbackInfo& info) | 42 static bool TestInterfaceNamedConstructorCreateDataProperty(v8::Local<v8::Name>
name, v8::Local<v8::Value> v8Value, const CallbackInfo& info) |
(...skipping 27 matching lines...) Expand all Loading... |
61 | 70 |
62 static void testNamedConstructorConstructorAttributeAttributeSetterCallback(v8::
Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo
id>& info) | 71 static void testNamedConstructorConstructorAttributeAttributeSetterCallback(v8::
Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<vo
id>& info) |
63 { | 72 { |
64 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 73 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
65 TestInterfaceNamedConstructorV8Internal::testNamedConstructorConstructorAttr
ibuteAttributeSetter(v8Value, info); | 74 TestInterfaceNamedConstructorV8Internal::testNamedConstructorConstructorAttr
ibuteAttributeSetter(v8Value, info); |
66 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 75 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
67 } | 76 } |
68 | 77 |
69 } // namespace TestInterfaceNamedConstructorV8Internal | 78 } // namespace TestInterfaceNamedConstructorV8Internal |
70 | 79 |
| 80 // Suppress warning: global constructors, because AttributeConfiguration is triv
ial |
| 81 // and does not depend on another global objects. |
| 82 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
| 83 #pragma clang diagnostic push |
| 84 #pragma clang diagnostic ignored "-Wglobal-constructors" |
| 85 #endif |
71 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceNamedCons
tructorAttributes[] = { | 86 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceNamedCons
tructorAttributes[] = { |
72 {"testNamedConstructorConstructorAttribute", v8ConstructorAttributeGetter, T
estInterfaceNamedConstructorV8Internal::testNamedConstructorConstructorAttribute
AttributeSetterCallback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestNamedConstruc
tor::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<
v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V
8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, | 87 {"testNamedConstructorConstructorAttribute", v8ConstructorAttributeGetter, T
estInterfaceNamedConstructorV8Internal::testNamedConstructorConstructorAttribute
AttributeSetterCallback, 0, 0, const_cast<WrapperTypeInfo*>(&V8TestNamedConstruc
tor::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<
v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V
8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, |
73 }; | 88 }; |
| 89 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
| 90 #pragma clang diagnostic pop |
| 91 #endif |
74 | 92 |
| 93 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv
ial |
| 94 // and does not depend on another global objects. |
| 95 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
| 96 #pragma clang diagnostic push |
| 97 #pragma clang diagnostic ignored "-Wglobal-constructors" |
| 98 #endif |
75 const WrapperTypeInfo V8TestInterfaceNamedConstructorConstructor::wrapperTypeInf
o = { gin::kEmbedderBlink, V8TestInterfaceNamedConstructorConstructor::domTempla
te, V8TestInterfaceNamedConstructor::refObject, V8TestInterfaceNamedConstructor:
:derefObject, V8TestInterfaceNamedConstructor::trace, V8TestInterfaceNamedConstr
uctor::toActiveDOMObject, 0, V8TestInterfaceNamedConstructor::preparePrototypeOb
ject, V8TestInterfaceNamedConstructor::installConditionallyEnabledProperties, "T
estInterfaceNamedConstructor", 0, WrapperTypeInfo::WrapperTypeObjectPrototype, W
rapperTypeInfo::ObjectClassId, WrapperTypeInfo::NotInheritFromEventTarget, Wrapp
erTypeInfo::Dependent, WrapperTypeInfo::RefCountedObject }; | 99 const WrapperTypeInfo V8TestInterfaceNamedConstructorConstructor::wrapperTypeInf
o = { gin::kEmbedderBlink, V8TestInterfaceNamedConstructorConstructor::domTempla
te, V8TestInterfaceNamedConstructor::refObject, V8TestInterfaceNamedConstructor:
:derefObject, V8TestInterfaceNamedConstructor::trace, V8TestInterfaceNamedConstr
uctor::toActiveDOMObject, 0, V8TestInterfaceNamedConstructor::preparePrototypeOb
ject, V8TestInterfaceNamedConstructor::installConditionallyEnabledProperties, "T
estInterfaceNamedConstructor", 0, WrapperTypeInfo::WrapperTypeObjectPrototype, W
rapperTypeInfo::ObjectClassId, WrapperTypeInfo::NotInheritFromEventTarget, Wrapp
erTypeInfo::Dependent, WrapperTypeInfo::RefCountedObject }; |
| 100 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
| 101 #pragma clang diagnostic pop |
| 102 #endif |
76 | 103 |
77 static void V8TestInterfaceNamedConstructorConstructorCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | 104 static void V8TestInterfaceNamedConstructorConstructorCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) |
78 { | 105 { |
79 if (!info.IsConstructCall()) { | 106 if (!info.IsConstructCall()) { |
80 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c
onstructorNotCallableAsFunction("Audio")); | 107 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c
onstructorNotCallableAsFunction("Audio")); |
81 return; | 108 return; |
82 } | 109 } |
83 | 110 |
84 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { | 111 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { |
85 v8SetReturnValue(info, info.Holder()); | 112 v8SetReturnValue(info, info.Holder()); |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 { | 236 { |
210 scriptWrappable->toImpl<TestInterfaceNamedConstructor>()->ref(); | 237 scriptWrappable->toImpl<TestInterfaceNamedConstructor>()->ref(); |
211 } | 238 } |
212 | 239 |
213 void V8TestInterfaceNamedConstructor::derefObject(ScriptWrappable* scriptWrappab
le) | 240 void V8TestInterfaceNamedConstructor::derefObject(ScriptWrappable* scriptWrappab
le) |
214 { | 241 { |
215 scriptWrappable->toImpl<TestInterfaceNamedConstructor>()->deref(); | 242 scriptWrappable->toImpl<TestInterfaceNamedConstructor>()->deref(); |
216 } | 243 } |
217 | 244 |
218 } // namespace blink | 245 } // namespace blink |
OLD | NEW |