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 "V8TestObject.h" | 8 #include "V8TestObject.h" |
9 | 9 |
10 #include "bindings/core/v8/BindingSecurity.h" | 10 #include "bindings/core/v8/BindingSecurity.h" |
(...skipping 8305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8316 exceptionState.throwIfNeeded(); | 8316 exceptionState.throwIfNeeded(); |
8317 } | 8317 } |
8318 | 8318 |
8319 static void overloadedMethodKMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 8319 static void overloadedMethodKMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
8320 { | 8320 { |
8321 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8321 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
8322 TestObjectV8Internal::overloadedMethodKMethod(info); | 8322 TestObjectV8Internal::overloadedMethodKMethod(info); |
8323 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8323 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
8324 } | 8324 } |
8325 | 8325 |
| 8326 static void overloadedMethodL1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 8327 { |
| 8328 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodL", "TestObject", info.Holder(), info.GetIsolate()); |
| 8329 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8330 int longArg; |
| 8331 Vector<ScriptValue> restArgs; |
| 8332 { |
| 8333 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); |
| 8334 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(restArgs, toImplArguments<ScriptVa
lue>(info, 1, exceptionState), exceptionState); |
| 8335 } |
| 8336 impl->overloadedMethodL(longArg, restArgs); |
| 8337 } |
| 8338 |
| 8339 static void overloadedMethodL2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 8340 { |
| 8341 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodL", "TestObject", info.Holder(), info.GetIsolate()); |
| 8342 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8343 V8StringResource<> stringArg; |
| 8344 Vector<ScriptValue> restArgs; |
| 8345 { |
| 8346 TOSTRING_VOID_INTERNAL(stringArg, info[0]); |
| 8347 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(restArgs, toImplArguments<ScriptVa
lue>(info, 1, exceptionState), exceptionState); |
| 8348 } |
| 8349 impl->overloadedMethodL(stringArg, restArgs); |
| 8350 } |
| 8351 |
| 8352 static void overloadedMethodLMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
| 8353 { |
| 8354 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodL", "TestObject", info.Holder(), info.GetIsolate()); |
| 8355 switch (std::min(2, info.Length())) { |
| 8356 case 1: |
| 8357 if (info[0]->IsNumber()) { |
| 8358 overloadedMethodL1Method(info); |
| 8359 return; |
| 8360 } |
| 8361 if (true) { |
| 8362 overloadedMethodL2Method(info); |
| 8363 return; |
| 8364 } |
| 8365 if (true) { |
| 8366 overloadedMethodL1Method(info); |
| 8367 return; |
| 8368 } |
| 8369 break; |
| 8370 case 2: |
| 8371 if (info[0]->IsNumber()) { |
| 8372 overloadedMethodL1Method(info); |
| 8373 return; |
| 8374 } |
| 8375 if (true) { |
| 8376 overloadedMethodL2Method(info); |
| 8377 return; |
| 8378 } |
| 8379 if (true) { |
| 8380 overloadedMethodL1Method(info); |
| 8381 return; |
| 8382 } |
| 8383 break; |
| 8384 default: |
| 8385 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 8386 exceptionState.throwIfNeeded(); |
| 8387 return; |
| 8388 } |
| 8389 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
| 8390 exceptionState.throwIfNeeded(); |
| 8391 } |
| 8392 |
| 8393 static void overloadedMethodLMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 8394 { |
| 8395 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8396 TestObjectV8Internal::overloadedMethodLMethod(info); |
| 8397 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 8398 } |
| 8399 |
8326 static void promiseOverloadMethod1Method(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | 8400 static void promiseOverloadMethod1Method(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
8327 { | 8401 { |
8328 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 8402 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
8329 v8SetReturnValue(info, impl->promiseOverloadMethod().v8Value()); | 8403 v8SetReturnValue(info, impl->promiseOverloadMethod().v8Value()); |
8330 } | 8404 } |
8331 | 8405 |
8332 static void promiseOverloadMethod2Method(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | 8406 static void promiseOverloadMethod2Method(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
8333 { | 8407 { |
8334 ExceptionState exceptionState(ExceptionState::ExecutionContext, "promiseOver
loadMethod", "TestObject", info.Holder(), info.GetIsolate()); | 8408 ExceptionState exceptionState(ExceptionState::ExecutionContext, "promiseOver
loadMethod", "TestObject", info.Holder(), info.GetIsolate()); |
8335 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 8409 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
(...skipping 2389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10725 {"overloadedMethodB", TestObjectV8Internal::overloadedMethodBMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10799 {"overloadedMethodB", TestObjectV8Internal::overloadedMethodBMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10726 {"overloadedMethodC", TestObjectV8Internal::overloadedMethodCMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10800 {"overloadedMethodC", TestObjectV8Internal::overloadedMethodCMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10727 {"overloadedMethodD", TestObjectV8Internal::overloadedMethodDMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10801 {"overloadedMethodD", TestObjectV8Internal::overloadedMethodDMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10728 {"overloadedMethodE", TestObjectV8Internal::overloadedMethodEMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10802 {"overloadedMethodE", TestObjectV8Internal::overloadedMethodEMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10729 {"overloadedMethodF", TestObjectV8Internal::overloadedMethodFMethodCallback,
0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 10803 {"overloadedMethodF", TestObjectV8Internal::overloadedMethodFMethodCallback,
0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
10730 {"overloadedMethodG", TestObjectV8Internal::overloadedMethodGMethodCallback,
0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 10804 {"overloadedMethodG", TestObjectV8Internal::overloadedMethodGMethodCallback,
0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
10731 {"overloadedMethodH", TestObjectV8Internal::overloadedMethodHMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10805 {"overloadedMethodH", TestObjectV8Internal::overloadedMethodHMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10732 {"overloadedMethodI", TestObjectV8Internal::overloadedMethodIMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10806 {"overloadedMethodI", TestObjectV8Internal::overloadedMethodIMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10733 {"overloadedMethodJ", TestObjectV8Internal::overloadedMethodJMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10807 {"overloadedMethodJ", TestObjectV8Internal::overloadedMethodJMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10734 {"overloadedMethodK", TestObjectV8Internal::overloadedMethodKMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10808 {"overloadedMethodK", TestObjectV8Internal::overloadedMethodKMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
| 10809 {"overloadedMethodL", TestObjectV8Internal::overloadedMethodLMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10735 {"promiseOverloadMethod", TestObjectV8Internal::promiseOverloadMethodMethodC
allback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 10810 {"promiseOverloadMethod", TestObjectV8Internal::promiseOverloadMethodMethodC
allback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
10736 {"overloadedPerWorldBindingsMethod", TestObjectV8Internal::overloadedPerWorl
dBindingsMethodMethodCallback, TestObjectV8Internal::overloadedPerWorldBindingsM
ethodMethodCallbackForMainWorld, 0, V8DOMConfiguration::ExposedToAllScripts}, | 10811 {"overloadedPerWorldBindingsMethod", TestObjectV8Internal::overloadedPerWorl
dBindingsMethodMethodCallback, TestObjectV8Internal::overloadedPerWorldBindingsM
ethodMethodCallbackForMainWorld, 0, V8DOMConfiguration::ExposedToAllScripts}, |
10737 {"voidMethodClampUnsignedShortArg", TestObjectV8Internal::voidMethodClampUns
ignedShortArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10812 {"voidMethodClampUnsignedShortArg", TestObjectV8Internal::voidMethodClampUns
ignedShortArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10738 {"voidMethodClampUnsignedLongArg", TestObjectV8Internal::voidMethodClampUnsi
gnedLongArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10813 {"voidMethodClampUnsignedLongArg", TestObjectV8Internal::voidMethodClampUnsi
gnedLongArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10739 {"voidMethodDefaultUndefinedTestInterfaceEmptyArg", TestObjectV8Internal::vo
idMethodDefaultUndefinedTestInterfaceEmptyArgMethodCallback, 0, 0, V8DOMConfigur
ation::ExposedToAllScripts}, | 10814 {"voidMethodDefaultUndefinedTestInterfaceEmptyArg", TestObjectV8Internal::vo
idMethodDefaultUndefinedTestInterfaceEmptyArgMethodCallback, 0, 0, V8DOMConfigur
ation::ExposedToAllScripts}, |
10740 {"voidMethodDefaultUndefinedLongArg", TestObjectV8Internal::voidMethodDefaul
tUndefinedLongArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 10815 {"voidMethodDefaultUndefinedLongArg", TestObjectV8Internal::voidMethodDefaul
tUndefinedLongArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
10741 {"voidMethodDefaultUndefinedStringArg", TestObjectV8Internal::voidMethodDefa
ultUndefinedStringArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScrip
ts}, | 10816 {"voidMethodDefaultUndefinedStringArg", TestObjectV8Internal::voidMethodDefa
ultUndefinedStringArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScrip
ts}, |
10742 {"voidMethodEnforceRangeLongArg", TestObjectV8Internal::voidMethodEnforceRan
geLongArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10817 {"voidMethodEnforceRangeLongArg", TestObjectV8Internal::voidMethodEnforceRan
geLongArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10743 {"voidMethodTreatNullAsEmptyStringStringArg", TestObjectV8Internal::voidMeth
odTreatNullAsEmptyStringStringArgMethodCallback, 0, 1, V8DOMConfiguration::Expos
edToAllScripts}, | 10818 {"voidMethodTreatNullAsEmptyStringStringArg", TestObjectV8Internal::voidMeth
odTreatNullAsEmptyStringStringArgMethodCallback, 0, 1, V8DOMConfiguration::Expos
edToAllScripts}, |
10744 {"voidMethodTreatNullAsNullStringStringArg", TestObjectV8Internal::voidMetho
dTreatNullAsNullStringStringArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed
ToAllScripts}, | 10819 {"voidMethodTreatNullAsNullStringStringArg", TestObjectV8Internal::voidMetho
dTreatNullAsNullStringStringArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed
ToAllScripts}, |
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11466 return false; | 11541 return false; |
11467 | 11542 |
11468 ScriptState::Scope scope(scriptState); | 11543 ScriptState::Scope scope(scriptState); |
11469 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 11544 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
11470 | 11545 |
11471 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; | 11546 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; |
11472 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); | 11547 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); |
11473 } | 11548 } |
11474 | 11549 |
11475 } // namespace blink | 11550 } // namespace blink |
OLD | NEW |