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 "V8TestInterfacePartial.h" | 7 #include "V8TestInterfacePartial.h" |
8 | 8 |
9 #include "bindings/core/v8/ExceptionState.h" | 9 #include "bindings/core/v8/ExceptionState.h" |
10 #include "bindings/core/v8/PrivateScriptRunner.h" | 10 #include "bindings/core/v8/PrivateScriptRunner.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 | 80 |
81 static void partial4StaticLongAttributeAttributeSetterCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | 81 static void partial4StaticLongAttributeAttributeSetterCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) |
82 { | 82 { |
83 v8::Local<v8::Value> v8Value = info[0]; | 83 v8::Local<v8::Value> v8Value = info[0]; |
84 TestInterfaceImplementationPartialV8Internal::partial4StaticLongAttributeAtt
ributeSetter(v8Value, info); | 84 TestInterfaceImplementationPartialV8Internal::partial4StaticLongAttributeAtt
ributeSetter(v8Value, info); |
85 } | 85 } |
86 | 86 |
87 static void voidMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v8::
Value>& info) | 87 static void voidMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v8::
Value>& info) |
88 { | 88 { |
89 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 89 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
| 90 |
90 V8StringResource<> value; | 91 V8StringResource<> value; |
91 { | 92 { |
92 value = info[0]; | 93 value = info[0]; |
93 if (!value.prepare()) | 94 if (!value.prepare()) |
94 return; | 95 return; |
95 } | 96 } |
96 TestInterfacePartial3Implementation::voidMethodPartialOverload(*impl, value)
; | 97 TestInterfacePartial3Implementation::voidMethodPartialOverload(*impl, value)
; |
97 } | 98 } |
98 | 99 |
99 static void voidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 100 static void voidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
100 { | 101 { |
101 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodP
artialOverload", "TestInterface", info.Holder(), info.GetIsolate()); | 102 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodP
artialOverload", "TestInterface", info.Holder(), info.GetIsolate()); |
102 switch (std::min(1, info.Length())) { | 103 switch (std::min(1, info.Length())) { |
103 case 0: | 104 case 0: |
104 break; | 105 break; |
105 case 1: | 106 case 1: |
106 if (true) { | 107 if (true) { |
107 voidMethodPartialOverload3Method(info); | 108 voidMethodPartialOverload3Method(info); |
108 return; | 109 return; |
109 } | 110 } |
110 break; | 111 break; |
111 default: | 112 default: |
112 break; | 113 break; |
113 } | 114 } |
114 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 115 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
115 return; | |
116 } | 116 } |
117 | 117 |
118 static void staticVoidMethodPartialOverload2Method(const v8::FunctionCallbackInf
o<v8::Value>& info) | 118 static void staticVoidMethodPartialOverload2Method(const v8::FunctionCallbackInf
o<v8::Value>& info) |
119 { | 119 { |
120 V8StringResource<> value; | 120 V8StringResource<> value; |
121 { | 121 { |
122 value = info[0]; | 122 value = info[0]; |
123 if (!value.prepare()) | 123 if (!value.prepare()) |
124 return; | 124 return; |
125 } | 125 } |
126 TestInterfacePartial3Implementation::staticVoidMethodPartialOverload(value); | 126 TestInterfacePartial3Implementation::staticVoidMethodPartialOverload(value); |
127 } | 127 } |
128 | 128 |
129 static void staticVoidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | 129 static void staticVoidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) |
130 { | 130 { |
131 ExceptionState exceptionState(ExceptionState::ExecutionContext, "staticVoidM
ethodPartialOverload", "TestInterface", info.Holder(), info.GetIsolate()); | 131 ExceptionState exceptionState(ExceptionState::ExecutionContext, "staticVoidM
ethodPartialOverload", "TestInterface", info.Holder(), info.GetIsolate()); |
132 switch (std::min(1, info.Length())) { | 132 switch (std::min(1, info.Length())) { |
133 case 0: | 133 case 0: |
134 break; | 134 break; |
135 case 1: | 135 case 1: |
136 if (true) { | 136 if (true) { |
137 staticVoidMethodPartialOverload2Method(info); | 137 staticVoidMethodPartialOverload2Method(info); |
138 return; | 138 return; |
139 } | 139 } |
140 break; | 140 break; |
141 default: | 141 default: |
142 break; | 142 break; |
143 } | 143 } |
144 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 144 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
145 return; | |
146 } | 145 } |
147 | 146 |
148 static void promiseMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v
8::Value>& info) | 147 static void promiseMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v
8::Value>& info) |
149 { | 148 { |
150 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 149 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
| 150 |
151 Document* document; | 151 Document* document; |
152 { | 152 { |
153 document = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0]); | 153 document = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
154 if (!document) { | 154 if (!document) { |
155 v8SetReturnValue(info, ScriptPromise::rejectRaw(ScriptState::current
(info.GetIsolate()), V8ThrowException::createTypeError(info.GetIsolate(), Except
ionMessages::failedToExecute("promiseMethodPartialOverload", "TestInterface", "p
arameter 1 is not of type 'Document'.")))); | 155 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage
s::failedToExecute("promiseMethodPartialOverload", "TestInterface", "parameter 1
is not of type 'Document'.")); |
156 return; | 156 return; |
157 } | 157 } |
158 } | 158 } |
159 v8SetReturnValue(info, TestInterfacePartial3Implementation::promiseMethodPar
tialOverload(*impl, document).v8Value()); | 159 v8SetReturnValue(info, TestInterfacePartial3Implementation::promiseMethodPar
tialOverload(*impl, document).v8Value()); |
160 } | 160 } |
161 | 161 |
162 static void promiseMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8
::Value>& info) | 162 static void promiseMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8
::Value>& info) |
163 { | 163 { |
164 ExceptionState exceptionState(ExceptionState::ExecutionContext, "promiseMeth
odPartialOverload", "TestInterface", info.Holder(), info.GetIsolate()); | 164 ExceptionState exceptionState(ExceptionState::ExecutionContext, "promiseMeth
odPartialOverload", "TestInterface", info.Holder(), info.GetIsolate()); |
165 switch (std::min(1, info.Length())) { | 165 switch (std::min(1, info.Length())) { |
166 case 0: | 166 case 0: |
167 break; | 167 break; |
168 case 1: | 168 case 1: |
169 if (V8Document::hasInstance(info[0], info.GetIsolate())) { | 169 if (V8Document::hasInstance(info[0], info.GetIsolate())) { |
170 promiseMethodPartialOverload3Method(info); | 170 promiseMethodPartialOverload3Method(info); |
171 return; | 171 return; |
172 } | 172 } |
173 break; | 173 break; |
174 default: | 174 default: |
175 break; | 175 break; |
176 } | 176 } |
177 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 177 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
178 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.GetIs
olate())).v8Value()); | |
179 return; | |
180 } | 178 } |
181 | 179 |
182 static void staticPromiseMethodPartialOverload2MethodPromise(const v8::FunctionC
allbackInfo<v8::Value>& info, ExceptionState& exceptionState) | 180 static void staticPromiseMethodPartialOverload2Method(const v8::FunctionCallback
Info<v8::Value>& info) |
183 { | 181 { |
| 182 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface", "staticPromiseMethodPartialOverload"); |
| 183 ScriptState* scriptState = ScriptState::forFunctionObject(info); |
| 184 ExceptionToPromiseScope exceptionToPromiseScope(info, scriptState, exception
State); |
| 185 |
184 V8StringResource<> value; | 186 V8StringResource<> value; |
185 { | 187 { |
186 value = info[0]; | 188 value = info[0]; |
187 if (!value.prepare(exceptionState)) | 189 if (!value.prepare(exceptionState)) |
188 return; | 190 return; |
189 } | 191 } |
190 v8SetReturnValue(info, TestInterfacePartial3Implementation::staticPromiseMet
hodPartialOverload(value).v8Value()); | 192 v8SetReturnValue(info, TestInterfacePartial3Implementation::staticPromiseMet
hodPartialOverload(value).v8Value()); |
191 } | 193 } |
192 | 194 |
193 static void staticPromiseMethodPartialOverload2Method(const v8::FunctionCallback
Info<v8::Value>& info) | |
194 { | |
195 ExceptionState exceptionState(ExceptionState::ExecutionContext, "staticPromi
seMethodPartialOverload", "TestInterface", info.Holder(), info.GetIsolate()); | |
196 staticPromiseMethodPartialOverload2MethodPromise(info, exceptionState); | |
197 if (exceptionState.hadException()) | |
198 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.G
etIsolate())).v8Value()); | |
199 } | |
200 | |
201 static void staticPromiseMethodPartialOverloadMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 195 static void staticPromiseMethodPartialOverloadMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
202 { | 196 { |
203 ExceptionState exceptionState(ExceptionState::ExecutionContext, "staticPromi
seMethodPartialOverload", "TestInterface", info.Holder(), info.GetIsolate()); | 197 ExceptionState exceptionState(ExceptionState::ExecutionContext, "staticPromi
seMethodPartialOverload", "TestInterface", info.Holder(), info.GetIsolate()); |
204 switch (std::min(1, info.Length())) { | 198 switch (std::min(1, info.Length())) { |
205 case 0: | 199 case 0: |
206 break; | 200 break; |
207 case 1: | 201 case 1: |
208 if (true) { | 202 if (true) { |
209 staticPromiseMethodPartialOverload2Method(info); | 203 staticPromiseMethodPartialOverload2Method(info); |
210 return; | 204 return; |
211 } | 205 } |
212 break; | 206 break; |
213 default: | 207 default: |
214 break; | 208 break; |
215 } | 209 } |
216 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 210 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
217 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.GetIs
olate())).v8Value()); | |
218 return; | |
219 } | 211 } |
220 | 212 |
221 static void partial2VoidMethod2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 213 static void partial2VoidMethod2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
222 { | 214 { |
223 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 215 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
| 216 |
224 V8StringResource<> value; | 217 V8StringResource<> value; |
225 { | 218 { |
226 value = info[0]; | 219 value = info[0]; |
227 if (!value.prepare()) | 220 if (!value.prepare()) |
228 return; | 221 return; |
229 } | 222 } |
230 TestInterfacePartial3Implementation::partial2VoidMethod(*impl, value); | 223 TestInterfacePartial3Implementation::partial2VoidMethod(*impl, value); |
231 } | 224 } |
232 | 225 |
233 static void partial2VoidMethod3Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 226 static void partial2VoidMethod3Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
234 { | 227 { |
235 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 228 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
| 229 |
236 Node* node; | 230 Node* node; |
237 { | 231 { |
238 node = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[0]); | 232 node = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
239 if (!node) { | 233 if (!node) { |
240 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage
s::failedToExecute("partial2VoidMethod", "TestInterface", "parameter 1 is not of
type 'Node'.")); | 234 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage
s::failedToExecute("partial2VoidMethod", "TestInterface", "parameter 1 is not of
type 'Node'.")); |
241 return; | 235 return; |
242 } | 236 } |
243 } | 237 } |
244 TestInterfacePartial3Implementation::partial2VoidMethod(*impl, node); | 238 TestInterfacePartial3Implementation::partial2VoidMethod(*impl, node); |
245 } | 239 } |
(...skipping 11 matching lines...) Expand all Loading... |
257 } | 251 } |
258 if (true) { | 252 if (true) { |
259 partial2VoidMethod2Method(info); | 253 partial2VoidMethod2Method(info); |
260 return; | 254 return; |
261 } | 255 } |
262 break; | 256 break; |
263 default: | 257 default: |
264 break; | 258 break; |
265 } | 259 } |
266 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 260 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
267 return; | |
268 } | 261 } |
269 | 262 |
270 static void partialVoidTestEnumModulesArgMethodMethod(const v8::FunctionCallback
Info<v8::Value>& info) | 263 static void partialVoidTestEnumModulesArgMethodMethod(const v8::FunctionCallback
Info<v8::Value>& info) |
271 { | 264 { |
272 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialVoid
TestEnumModulesArgMethod", "TestInterface", info.Holder(), info.GetIsolate()); | 265 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface", "partialVoidTestEnumModulesArgMethod"); |
| 266 |
273 if (UNLIKELY(info.Length() < 1)) { | 267 if (UNLIKELY(info.Length() < 1)) { |
274 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 268 throwMinimumArityError(exceptionState, 1, info.Length()); |
275 return; | 269 return; |
276 } | 270 } |
| 271 |
277 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 272 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
| 273 |
278 V8StringResource<> arg; | 274 V8StringResource<> arg; |
279 { | 275 { |
280 arg = info[0]; | 276 arg = info[0]; |
281 if (!arg.prepare()) | 277 if (!arg.prepare()) |
282 return; | 278 return; |
283 const char* validValues[] = { | 279 const char* validValues[] = { |
284 "EnumModulesValue1", | 280 "EnumModulesValue1", |
285 "EnumModulesValue2", | 281 "EnumModulesValue2", |
286 }; | 282 }; |
287 if (!isValidEnum(arg, validValues, WTF_ARRAY_LENGTH(validValues), "TestE
numModules", exceptionState)) { | 283 if (!isValidEnum(arg, validValues, WTF_ARRAY_LENGTH(validValues), "TestE
numModules", exceptionState)) { |
(...skipping 28 matching lines...) Expand all Loading... |
316 case 1: | 312 case 1: |
317 if (true) { | 313 if (true) { |
318 partial2StaticVoidMethod2Method(info); | 314 partial2StaticVoidMethod2Method(info); |
319 return; | 315 return; |
320 } | 316 } |
321 break; | 317 break; |
322 default: | 318 default: |
323 break; | 319 break; |
324 } | 320 } |
325 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 321 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
326 return; | |
327 } | 322 } |
328 | 323 |
329 static void unscopeableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) | 324 static void unscopeableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) |
330 { | 325 { |
331 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 326 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
| 327 |
332 TestInterfacePartial3Implementation::unscopeableVoidMethod(*impl); | 328 TestInterfacePartial3Implementation::unscopeableVoidMethod(*impl); |
333 } | 329 } |
334 | 330 |
335 static void unscopeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | 331 static void unscopeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
336 { | 332 { |
337 TestInterfaceImplementationPartialV8Internal::unscopeableVoidMethodMethod(in
fo); | 333 TestInterfaceImplementationPartialV8Internal::unscopeableVoidMethodMethod(in
fo); |
338 } | 334 } |
339 | 335 |
340 static void partial4VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 336 static void partial4VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
341 { | 337 { |
342 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 338 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
| 339 |
343 TestInterfacePartial4::partial4VoidMethod(*impl); | 340 TestInterfacePartial4::partial4VoidMethod(*impl); |
344 } | 341 } |
345 | 342 |
346 static void partial4VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | 343 static void partial4VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) |
347 { | 344 { |
348 TestInterfaceImplementationPartialV8Internal::partial4VoidMethodMethod(info)
; | 345 TestInterfaceImplementationPartialV8Internal::partial4VoidMethodMethod(info)
; |
349 } | 346 } |
350 | 347 |
351 static void partial4StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 348 static void partial4StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
352 { | 349 { |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 V8TestInterfacePartial::preparePrototypeAndInterfaceObject); | 432 V8TestInterfacePartial::preparePrototypeAndInterfaceObject); |
436 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface(
&TestInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod); | 433 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface(
&TestInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod); |
437 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInte
rface(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOver
loadMethod); | 434 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInte
rface(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOver
loadMethod); |
438 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterfa
ce(&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMe
thod); | 435 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterfa
ce(&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMe
thod); |
439 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialI
nterface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodParti
alOverloadMethod); | 436 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialI
nterface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodParti
alOverloadMethod); |
440 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestIn
terfaceImplementationPartialV8Internal::partial2VoidMethodMethod); | 437 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestIn
terfaceImplementationPartialV8Internal::partial2VoidMethodMethod); |
441 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(&
TestInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod); | 438 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(&
TestInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod); |
442 } | 439 } |
443 | 440 |
444 } // namespace blink | 441 } // namespace blink |
OLD | NEW |