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 "V8TestInterface3.h" | 7 #include "V8TestInterface3.h" |
8 | 8 |
9 #include "bindings/core/v8/ExceptionState.h" | 9 #include "bindings/core/v8/ExceptionState.h" |
10 #include "bindings/core/v8/ScriptState.h" | 10 #include "bindings/core/v8/ScriptState.h" |
11 #include "bindings/core/v8/ScriptValue.h" | 11 #include "bindings/core/v8/ScriptValue.h" |
12 #include "bindings/core/v8/V8DOMConfiguration.h" | 12 #include "bindings/core/v8/V8DOMConfiguration.h" |
13 #include "bindings/core/v8/V8Document.h" | 13 #include "bindings/core/v8/V8Document.h" |
14 #include "bindings/core/v8/V8Iterator.h" | 14 #include "bindings/core/v8/V8Iterator.h" |
15 #include "bindings/core/v8/V8Node.h" | 15 #include "bindings/core/v8/V8Node.h" |
16 #include "bindings/core/v8/V8ObjectConstructor.h" | 16 #include "bindings/core/v8/V8ObjectConstructor.h" |
17 #include "core/dom/Document.h" | 17 #include "core/dom/Document.h" |
18 #include "platform/RuntimeEnabledFeatures.h" | 18 #include "platform/RuntimeEnabledFeatures.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 | 24 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv
ial |
25 // and does not depend on another global objects. | 25 // and does not depend on another global objects. |
26 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) | 26 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
27 #pragma clang diagnostic push | 27 #pragma clang diagnostic push |
28 #pragma clang diagnostic ignored "-Wglobal-constructors" | 28 #pragma clang diagnostic ignored "-Wglobal-constructors" |
29 #endif | 29 #endif |
30 const WrapperTypeInfo V8TestInterface3::wrapperTypeInfo = { gin::kEmbedderBlink,
V8TestInterface3::domTemplate, V8TestInterface3::refObject, V8TestInterface3::d
erefObject, V8TestInterface3::trace, 0, V8TestInterface3::visitDOMWrapper, V8Tes
tInterface3::preparePrototypeAndInterfaceObject, V8TestInterface3::installCondit
ionallyEnabledProperties, "TestInterface3", 0, WrapperTypeInfo::WrapperTypeObjec
tPrototype, WrapperTypeInfo::ObjectClassId, WrapperTypeInfo::NotInheritFromEvent
Target, WrapperTypeInfo::Dependent, WrapperTypeInfo::RefCountedObject }; | 30 const WrapperTypeInfo V8TestInterface3::wrapperTypeInfo = { gin::kEmbedderBlink,
V8TestInterface3::domTemplate, V8TestInterface3::trace, 0, V8TestInterface3::vi
sitDOMWrapper, V8TestInterface3::preparePrototypeAndInterfaceObject, V8TestInter
face3::installConditionallyEnabledProperties, "TestInterface3", 0, WrapperTypeIn
fo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassId, WrapperTypeInfo:
:NotInheritFromEventTarget, WrapperTypeInfo::Dependent }; |
31 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) | 31 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
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
e3.h. | 35 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac
e3.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& TestInterface3::s_wrapperTypeInfo = V8TestInterface3::wra
pperTypeInfo; | 38 const WrapperTypeInfo& TestInterface3::s_wrapperTypeInfo = V8TestInterface3::wra
pperTypeInfo; |
39 | 39 |
40 namespace TestInterface3V8Internal { | 40 namespace TestInterface3V8Internal { |
(...skipping 19 matching lines...) Expand all Loading... |
60 static void voidMethodDocumentMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | 60 static void voidMethodDocumentMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) |
61 { | 61 { |
62 TestInterface3V8Internal::voidMethodDocumentMethod(info); | 62 TestInterface3V8Internal::voidMethodDocumentMethod(info); |
63 } | 63 } |
64 | 64 |
65 static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 65 static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
66 { | 66 { |
67 ExceptionState exceptionState(ExceptionState::ExecutionContext, "keys", "Tes
tInterface3", info.Holder(), info.GetIsolate()); | 67 ExceptionState exceptionState(ExceptionState::ExecutionContext, "keys", "Tes
tInterface3", info.Holder(), info.GetIsolate()); |
68 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); | 68 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); |
69 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 69 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
70 RawPtr<Iterator> result = impl->iterableKeys(scriptState, exceptionState); | 70 Iterator* result = impl->iterableKeys(scriptState, exceptionState); |
71 if (exceptionState.hadException()) { | 71 if (exceptionState.hadException()) { |
72 exceptionState.throwIfNeeded(); | 72 exceptionState.throwIfNeeded(); |
73 return; | 73 return; |
74 } | 74 } |
75 v8SetReturnValue(info, result.release()); | 75 v8SetReturnValue(info, result); |
76 } | 76 } |
77 | 77 |
78 static void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) | 78 static void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) |
79 { | 79 { |
80 TestInterface3V8Internal::keysMethod(info); | 80 TestInterface3V8Internal::keysMethod(info); |
81 } | 81 } |
82 | 82 |
83 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 83 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
84 { | 84 { |
85 ExceptionState exceptionState(ExceptionState::ExecutionContext, "values", "T
estInterface3", info.Holder(), info.GetIsolate()); | 85 ExceptionState exceptionState(ExceptionState::ExecutionContext, "values", "T
estInterface3", info.Holder(), info.GetIsolate()); |
86 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); | 86 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); |
87 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 87 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
88 RawPtr<Iterator> result = impl->valuesForBinding(scriptState, exceptionState
); | 88 Iterator* result = impl->valuesForBinding(scriptState, exceptionState); |
89 if (exceptionState.hadException()) { | 89 if (exceptionState.hadException()) { |
90 exceptionState.throwIfNeeded(); | 90 exceptionState.throwIfNeeded(); |
91 return; | 91 return; |
92 } | 92 } |
93 v8SetReturnValue(info, result.release()); | 93 v8SetReturnValue(info, result); |
94 } | 94 } |
95 | 95 |
96 static void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info
) | 96 static void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info
) |
97 { | 97 { |
98 TestInterface3V8Internal::valuesMethod(info); | 98 TestInterface3V8Internal::valuesMethod(info); |
99 } | 99 } |
100 | 100 |
101 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 101 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
102 { | 102 { |
103 ExceptionState exceptionState(ExceptionState::ExecutionContext, "entries", "
TestInterface3", info.Holder(), info.GetIsolate()); | 103 ExceptionState exceptionState(ExceptionState::ExecutionContext, "entries", "
TestInterface3", info.Holder(), info.GetIsolate()); |
104 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); | 104 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); |
105 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 105 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
106 RawPtr<Iterator> result = impl->entriesForBinding(scriptState, exceptionStat
e); | 106 Iterator* result = impl->entriesForBinding(scriptState, exceptionState); |
107 if (exceptionState.hadException()) { | 107 if (exceptionState.hadException()) { |
108 exceptionState.throwIfNeeded(); | 108 exceptionState.throwIfNeeded(); |
109 return; | 109 return; |
110 } | 110 } |
111 v8SetReturnValue(info, result.release()); | 111 v8SetReturnValue(info, result); |
112 } | 112 } |
113 | 113 |
114 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) | 114 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) |
115 { | 115 { |
116 TestInterface3V8Internal::entriesMethod(info); | 116 TestInterface3V8Internal::entriesMethod(info); |
117 } | 117 } |
118 | 118 |
119 static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 119 static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
120 { | 120 { |
121 ExceptionState exceptionState(ExceptionState::ExecutionContext, "forEach", "
TestInterface3", info.Holder(), info.GetIsolate()); | 121 ExceptionState exceptionState(ExceptionState::ExecutionContext, "forEach", "
TestInterface3", info.Holder(), info.GetIsolate()); |
(...skipping 25 matching lines...) Expand all Loading... |
147 static void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) | 147 static void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf
o) |
148 { | 148 { |
149 TestInterface3V8Internal::forEachMethod(info); | 149 TestInterface3V8Internal::forEachMethod(info); |
150 } | 150 } |
151 | 151 |
152 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 152 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
153 { | 153 { |
154 ExceptionState exceptionState(ExceptionState::ExecutionContext, "iterator",
"TestInterface3", info.Holder(), info.GetIsolate()); | 154 ExceptionState exceptionState(ExceptionState::ExecutionContext, "iterator",
"TestInterface3", info.Holder(), info.GetIsolate()); |
155 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); | 155 TestInterface3* impl = V8TestInterface3::toImpl(info.Holder()); |
156 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); | 156 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); |
157 RawPtr<Iterator> result = impl->iterator(scriptState, exceptionState); | 157 Iterator* result = impl->iterator(scriptState, exceptionState); |
158 if (exceptionState.hadException()) { | 158 if (exceptionState.hadException()) { |
159 exceptionState.throwIfNeeded(); | 159 exceptionState.throwIfNeeded(); |
160 return; | 160 return; |
161 } | 161 } |
162 v8SetReturnValue(info, result.release()); | 162 v8SetReturnValue(info, result); |
163 } | 163 } |
164 | 164 |
165 static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 165 static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
166 { | 166 { |
167 TestInterface3V8Internal::iteratorMethod(info); | 167 TestInterface3V8Internal::iteratorMethod(info); |
168 } | 168 } |
169 | 169 |
170 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCall
backInfo<v8::Value>& info) | 170 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCall
backInfo<v8::Value>& info) |
171 { | 171 { |
172 V8TestInterface3::indexedPropertyGetterCustom(index, info); | 172 V8TestInterface3::indexedPropertyGetterCustom(index, info); |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 v8::Local<v8::Object> V8TestInterface3::findInstanceInPrototypeChain(v8::Local<v
8::Value> v8Value, v8::Isolate* isolate) | 270 v8::Local<v8::Object> V8TestInterface3::findInstanceInPrototypeChain(v8::Local<v
8::Value> v8Value, v8::Isolate* isolate) |
271 { | 271 { |
272 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 272 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
273 } | 273 } |
274 | 274 |
275 TestInterface3* V8TestInterface3::toImplWithTypeCheck(v8::Isolate* isolate, v8::
Local<v8::Value> value) | 275 TestInterface3* V8TestInterface3::toImplWithTypeCheck(v8::Isolate* isolate, v8::
Local<v8::Value> value) |
276 { | 276 { |
277 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu
e)) : 0; | 277 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu
e)) : 0; |
278 } | 278 } |
279 | 279 |
280 void V8TestInterface3::refObject(ScriptWrappable* scriptWrappable) | |
281 { | |
282 scriptWrappable->toImpl<TestInterface3>()->ref(); | |
283 } | |
284 | |
285 void V8TestInterface3::derefObject(ScriptWrappable* scriptWrappable) | |
286 { | |
287 scriptWrappable->toImpl<TestInterface3>()->deref(); | |
288 } | |
289 | |
290 } // namespace blink | 280 } // namespace blink |
OLD | NEW |