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 "V8TestInterfaceWillBeGarbageCollected.h" | 8 #include "V8TestInterfaceWillBeGarbageCollected.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 "bindings/core/v8/V8TestInterfaceWillBeGarbageCollected.h" | 13 #include "bindings/core/v8/V8TestInterfaceWillBeGarbageCollected.h" |
14 #include "core/dom/ContextFeatures.h" | 14 #include "core/dom/ContextFeatures.h" |
15 #include "core/dom/Document.h" | 15 #include "core/dom/Document.h" |
16 #include "core/frame/LocalDOMWindow.h" | 16 #include "core/frame/LocalDOMWindow.h" |
17 #include "platform/RuntimeEnabledFeatures.h" | 17 #include "platform/RuntimeEnabledFeatures.h" |
18 #include "platform/TraceEvent.h" | 18 #include "platform/TraceEvent.h" |
19 #include "wtf/GetPtr.h" | 19 #include "wtf/GetPtr.h" |
20 #include "wtf/RefPtr.h" | 20 #include "wtf/RefPtr.h" |
21 | 21 |
22 namespace blink { | 22 namespace blink { |
23 | 23 |
| 24 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv
ial |
| 25 // and does not depend on another global objects. |
| 26 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
| 27 #pragma clang diagnostic push |
| 28 #pragma clang diagnostic ignored "-Wglobal-constructors" |
| 29 #endif |
24 const WrapperTypeInfo V8TestInterfaceWillBeGarbageCollected::wrapperTypeInfo = {
gin::kEmbedderBlink, V8TestInterfaceWillBeGarbageCollected::domTemplate, V8Test
InterfaceWillBeGarbageCollected::refObject, V8TestInterfaceWillBeGarbageCollecte
d::derefObject, V8TestInterfaceWillBeGarbageCollected::trace, 0, 0, V8TestInterf
aceWillBeGarbageCollected::preparePrototypeObject, V8TestInterfaceWillBeGarbageC
ollected::installConditionallyEnabledProperties, "TestInterfaceWillBeGarbageColl
ected", &V8EventTarget::wrapperTypeInfo, WrapperTypeInfo::WrapperTypeObjectProto
type, WrapperTypeInfo::ObjectClassId, WrapperTypeInfo::InheritFromEventTarget, W
rapperTypeInfo::Independent, WrapperTypeInfo::WillBeGarbageCollectedObject }; | 30 const WrapperTypeInfo V8TestInterfaceWillBeGarbageCollected::wrapperTypeInfo = {
gin::kEmbedderBlink, V8TestInterfaceWillBeGarbageCollected::domTemplate, V8Test
InterfaceWillBeGarbageCollected::refObject, V8TestInterfaceWillBeGarbageCollecte
d::derefObject, V8TestInterfaceWillBeGarbageCollected::trace, 0, 0, V8TestInterf
aceWillBeGarbageCollected::preparePrototypeObject, V8TestInterfaceWillBeGarbageC
ollected::installConditionallyEnabledProperties, "TestInterfaceWillBeGarbageColl
ected", &V8EventTarget::wrapperTypeInfo, WrapperTypeInfo::WrapperTypeObjectProto
type, WrapperTypeInfo::ObjectClassId, WrapperTypeInfo::InheritFromEventTarget, W
rapperTypeInfo::Independent, WrapperTypeInfo::WillBeGarbageCollectedObject }; |
| 31 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
| 32 #pragma clang diagnostic pop |
| 33 #endif |
25 | 34 |
26 // 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. |
27 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in | 36 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in |
28 // bindings/core/v8/ScriptWrappable.h. | 37 // bindings/core/v8/ScriptWrappable.h. |
29 const WrapperTypeInfo& TestInterfaceWillBeGarbageCollected::s_wrapperTypeInfo =
V8TestInterfaceWillBeGarbageCollected::wrapperTypeInfo; | 38 const WrapperTypeInfo& TestInterfaceWillBeGarbageCollected::s_wrapperTypeInfo =
V8TestInterfaceWillBeGarbageCollected::wrapperTypeInfo; |
30 | 39 |
31 namespace TestInterfaceWillBeGarbageCollectedV8Internal { | 40 namespace TestInterfaceWillBeGarbageCollectedV8Internal { |
32 | 41 |
33 static void attr1AttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info
) | 42 static void attr1AttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info
) |
34 { | 43 { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 return; | 102 return; |
94 } | 103 } |
95 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface
WillBeGarbageCollected::create(str); | 104 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface
WillBeGarbageCollected::create(str); |
96 v8::Local<v8::Object> wrapper = info.Holder(); | 105 v8::Local<v8::Object> wrapper = info.Holder(); |
97 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceWillBeGarbageC
ollected::wrapperTypeInfo, wrapper); | 106 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceWillBeGarbageC
ollected::wrapperTypeInfo, wrapper); |
98 v8SetReturnValue(info, wrapper); | 107 v8SetReturnValue(info, wrapper); |
99 } | 108 } |
100 | 109 |
101 } // namespace TestInterfaceWillBeGarbageCollectedV8Internal | 110 } // namespace TestInterfaceWillBeGarbageCollectedV8Internal |
102 | 111 |
| 112 // Suppress warning: global constructors, because AttributeConfiguration is triv
ial |
| 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 |
103 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceWillBeGar
bageCollectedAttributes[] = { | 118 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceWillBeGar
bageCollectedAttributes[] = { |
104 {"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}, | 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}, |
105 }; | 120 }; |
| 121 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
| 122 #pragma clang diagnostic pop |
| 123 #endif |
106 | 124 |
| 125 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv
ial |
| 126 // and does not depend on another global objects. |
| 127 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
| 128 #pragma clang diagnostic push |
| 129 #pragma clang diagnostic ignored "-Wglobal-constructors" |
| 130 #endif |
107 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 }; |
| 132 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
| 133 #pragma clang diagnostic pop |
| 134 #endif |
108 | 135 |
109 static void V8TestInterfaceWillBeGarbageCollectedConstructorCallback(const v8::F
unctionCallbackInfo<v8::Value>& info) | 136 static void V8TestInterfaceWillBeGarbageCollectedConstructorCallback(const v8::F
unctionCallbackInfo<v8::Value>& info) |
110 { | 137 { |
111 if (!info.IsConstructCall()) { | 138 if (!info.IsConstructCall()) { |
112 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c
onstructorNotCallableAsFunction("TestInterface")); | 139 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c
onstructorNotCallableAsFunction("TestInterface")); |
113 return; | 140 return; |
114 } | 141 } |
115 | 142 |
116 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { | 143 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { |
117 v8SetReturnValue(info, info.Holder()); | 144 v8SetReturnValue(info, info.Holder()); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 } | 246 } |
220 | 247 |
221 void V8TestInterfaceWillBeGarbageCollected::derefObject(ScriptWrappable* scriptW
rappable) | 248 void V8TestInterfaceWillBeGarbageCollected::derefObject(ScriptWrappable* scriptW
rappable) |
222 { | 249 { |
223 #if !ENABLE(OILPAN) | 250 #if !ENABLE(OILPAN) |
224 scriptWrappable->toImpl<TestInterfaceWillBeGarbageCollected>()->deref(); | 251 scriptWrappable->toImpl<TestInterfaceWillBeGarbageCollected>()->deref(); |
225 #endif | 252 #endif |
226 } | 253 } |
227 | 254 |
228 } // namespace blink | 255 } // namespace blink |
OLD | NEW |