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 // clang-format off | 7 // clang-format off |
8 #include "V8TestInterfacePartial.h" | 8 #include "V8TestInterfacePartial.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface", "staticVoidMethodPartialOverload"); | 160 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface", "staticVoidMethodPartialOverload"); |
161 | 161 |
162 if (isArityError) { | 162 if (isArityError) { |
163 } | 163 } |
164 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 164 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
165 } | 165 } |
166 | 166 |
167 static void promiseMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v
8::Value>& info) | 167 static void promiseMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v
8::Value>& info) |
168 { | 168 { |
169 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface", "promiseMethodPartialOverload"); | 169 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface", "promiseMethodPartialOverload"); |
170 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 170 ExceptionToRejectPromiseScope rejectPromiseScope(info, exceptionState); |
171 ExceptionToRejectPromiseScope rejectPromiseScope(info, scriptState, exceptio
nState); | |
172 | 171 |
173 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 172 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
174 | 173 |
175 Document* document; | 174 Document* document; |
176 document = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0]); | 175 document = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
177 if (!document) { | 176 if (!document) { |
178 exceptionState.throwTypeError("parameter 1 is not of type 'Document'."); | 177 exceptionState.throwTypeError("parameter 1 is not of type 'Document'."); |
179 | 178 |
180 return; | 179 return; |
181 } | 180 } |
(...skipping 11 matching lines...) Expand all Loading... |
193 if (V8Document::hasInstance(info[0], info.GetIsolate())) { | 192 if (V8Document::hasInstance(info[0], info.GetIsolate())) { |
194 promiseMethodPartialOverload3Method(info); | 193 promiseMethodPartialOverload3Method(info); |
195 return; | 194 return; |
196 } | 195 } |
197 break; | 196 break; |
198 default: | 197 default: |
199 isArityError = true; | 198 isArityError = true; |
200 } | 199 } |
201 | 200 |
202 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface", "promiseMethodPartialOverload"); | 201 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface", "promiseMethodPartialOverload"); |
203 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 202 ExceptionToRejectPromiseScope rejectPromiseScope(info, exceptionState); |
204 ExceptionToRejectPromiseScope rejectPromiseScope(info, scriptState, exceptio
nState); | |
205 | 203 |
206 if (isArityError) { | 204 if (isArityError) { |
207 } | 205 } |
208 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 206 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
209 } | 207 } |
210 | 208 |
211 static void staticPromiseMethodPartialOverload2Method(const v8::FunctionCallback
Info<v8::Value>& info) | 209 static void staticPromiseMethodPartialOverload2Method(const v8::FunctionCallback
Info<v8::Value>& info) |
212 { | 210 { |
213 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface", "staticPromiseMethodPartialOverload"); | 211 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface", "staticPromiseMethodPartialOverload"); |
214 ScriptState* scriptState = ScriptState::forFunctionObject(info); | 212 ExceptionToRejectPromiseScope rejectPromiseScope(info, exceptionState); |
215 ExceptionToRejectPromiseScope rejectPromiseScope(info, scriptState, exceptio
nState); | |
216 | 213 |
217 V8StringResource<> value; | 214 V8StringResource<> value; |
218 value = info[0]; | 215 value = info[0]; |
219 if (!value.prepare(exceptionState)) | 216 if (!value.prepare(exceptionState)) |
220 return; | 217 return; |
221 | 218 |
222 v8SetReturnValue(info, TestInterfacePartial3Implementation::staticPromiseMet
hodPartialOverload(value).v8Value()); | 219 v8SetReturnValue(info, TestInterfacePartial3Implementation::staticPromiseMet
hodPartialOverload(value).v8Value()); |
223 } | 220 } |
224 | 221 |
225 static void staticPromiseMethodPartialOverloadMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 222 static void staticPromiseMethodPartialOverloadMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
226 { | 223 { |
227 bool isArityError = false; | 224 bool isArityError = false; |
228 switch (std::min(1, info.Length())) { | 225 switch (std::min(1, info.Length())) { |
229 case 0: | 226 case 0: |
230 break; | 227 break; |
231 case 1: | 228 case 1: |
232 if (true) { | 229 if (true) { |
233 staticPromiseMethodPartialOverload2Method(info); | 230 staticPromiseMethodPartialOverload2Method(info); |
234 return; | 231 return; |
235 } | 232 } |
236 break; | 233 break; |
237 default: | 234 default: |
238 isArityError = true; | 235 isArityError = true; |
239 } | 236 } |
240 | 237 |
241 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface", "staticPromiseMethodPartialOverload"); | 238 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface", "staticPromiseMethodPartialOverload"); |
242 ScriptState* scriptState = ScriptState::forReceiverObject(info); | 239 ExceptionToRejectPromiseScope rejectPromiseScope(info, exceptionState); |
243 ExceptionToRejectPromiseScope rejectPromiseScope(info, scriptState, exceptio
nState); | |
244 | 240 |
245 if (isArityError) { | 241 if (isArityError) { |
246 } | 242 } |
247 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 243 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
248 } | 244 } |
249 | 245 |
250 static void partial2VoidMethod2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 246 static void partial2VoidMethod2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
251 { | 247 { |
252 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 248 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
253 | 249 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 "EnumModulesValue1", | 316 "EnumModulesValue1", |
321 "EnumModulesValue2", | 317 "EnumModulesValue2", |
322 }; | 318 }; |
323 if (!isValidEnum(arg, validArgValues, WTF_ARRAY_LENGTH(validArgValues), "Tes
tEnumModules", exceptionState)) { | 319 if (!isValidEnum(arg, validArgValues, WTF_ARRAY_LENGTH(validArgValues), "Tes
tEnumModules", exceptionState)) { |
324 return; | 320 return; |
325 } | 321 } |
326 | 322 |
327 TestInterfacePartial3Implementation::partialVoidTestEnumModulesArgMethod(*im
pl, arg); | 323 TestInterfacePartial3Implementation::partialVoidTestEnumModulesArgMethod(*im
pl, arg); |
328 } | 324 } |
329 | 325 |
330 static void partialVoidTestEnumModulesArgMethodMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) | 326 void partialVoidTestEnumModulesArgMethodMethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) |
331 { | 327 { |
332 TestInterfaceImplementationPartialV8Internal::partialVoidTestEnumModulesArgM
ethodMethod(info); | 328 TestInterfaceImplementationPartialV8Internal::partialVoidTestEnumModulesArgM
ethodMethod(info); |
333 } | 329 } |
334 | 330 |
335 static void partial2StaticVoidMethod2Method(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 331 static void partial2StaticVoidMethod2Method(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
336 { | 332 { |
337 V8StringResource<> value; | 333 V8StringResource<> value; |
338 value = info[0]; | 334 value = info[0]; |
339 if (!value.prepare()) | 335 if (!value.prepare()) |
340 return; | 336 return; |
(...skipping 24 matching lines...) Expand all Loading... |
365 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 361 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
366 } | 362 } |
367 | 363 |
368 static void unscopableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) | 364 static void unscopableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) |
369 { | 365 { |
370 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 366 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
371 | 367 |
372 TestInterfacePartial3Implementation::unscopableVoidMethod(*impl); | 368 TestInterfacePartial3Implementation::unscopableVoidMethod(*impl); |
373 } | 369 } |
374 | 370 |
375 static void unscopableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) | 371 void unscopableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value
>& info) |
376 { | 372 { |
377 TestInterfaceImplementationPartialV8Internal::unscopableVoidMethodMethod(inf
o); | 373 TestInterfaceImplementationPartialV8Internal::unscopableVoidMethodMethod(inf
o); |
378 } | 374 } |
379 | 375 |
380 static void partial4VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 376 static void partial4VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
381 { | 377 { |
382 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 378 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
383 | 379 |
384 TestInterfacePartial4::partial4VoidMethod(*impl); | 380 TestInterfacePartial4::partial4VoidMethod(*impl); |
385 } | 381 } |
386 | 382 |
387 static void partial4VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) | 383 void partial4VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) |
388 { | 384 { |
389 TestInterfaceImplementationPartialV8Internal::partial4VoidMethodMethod(info)
; | 385 TestInterfaceImplementationPartialV8Internal::partial4VoidMethodMethod(info)
; |
390 } | 386 } |
391 | 387 |
392 static void partial4StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 388 static void partial4StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
393 { | 389 { |
394 TestInterfacePartial4::partial4StaticVoidMethod(); | 390 TestInterfacePartial4::partial4StaticVoidMethod(); |
395 } | 391 } |
396 | 392 |
397 static void partial4StaticVoidMethodMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) | 393 void partial4StaticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
398 { | 394 { |
399 TestInterfaceImplementationPartialV8Internal::partial4StaticVoidMethodMethod
(info); | 395 TestInterfaceImplementationPartialV8Internal::partial4StaticVoidMethodMethod
(info); |
400 } | 396 } |
401 | 397 |
402 } // namespace TestInterfaceImplementationPartialV8Internal | 398 } // namespace TestInterfaceImplementationPartialV8Internal |
403 | 399 |
404 const V8DOMConfiguration::MethodConfiguration V8TestInterfaceMethods[] = { | 400 const V8DOMConfiguration::MethodConfiguration V8TestInterfaceMethods[] = { |
405 {"partialVoidTestEnumModulesArgMethod", TestInterfaceImplementationPartialV8
Internal::partialVoidTestEnumModulesArgMethodMethodCallback, 0, 1, v8::None, V8D
OMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, | 401 {"partialVoidTestEnumModulesArgMethod", TestInterfaceImplementationPartialV8
Internal::partialVoidTestEnumModulesArgMethodMethodCallback, 0, 1, v8::None, V8D
OMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
406 {"unscopableVoidMethod", TestInterfaceImplementationPartialV8Internal::unsco
pableVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllS
cripts, V8DOMConfiguration::OnPrototype}, | 402 {"unscopableVoidMethod", TestInterfaceImplementationPartialV8Internal::unsco
pableVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllS
cripts, V8DOMConfiguration::OnPrototype}, |
407 }; | 403 }; |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 V8TestInterfacePartial::preparePrototypeAndInterfaceObject); | 477 V8TestInterfacePartial::preparePrototypeAndInterfaceObject); |
482 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface(
&TestInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod); | 478 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface(
&TestInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod); |
483 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInte
rface(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOver
loadMethod); | 479 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInte
rface(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOver
loadMethod); |
484 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterfa
ce(&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMe
thod); | 480 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterfa
ce(&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMe
thod); |
485 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialI
nterface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodParti
alOverloadMethod); | 481 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialI
nterface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodParti
alOverloadMethod); |
486 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestIn
terfaceImplementationPartialV8Internal::partial2VoidMethodMethod); | 482 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestIn
terfaceImplementationPartialV8Internal::partial2VoidMethodMethod); |
487 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(&
TestInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod); | 483 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(&
TestInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod); |
488 } | 484 } |
489 | 485 |
490 } // namespace blink | 486 } // namespace blink |
OLD | NEW |