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 8255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8266 exceptionState.throwIfNeeded(); | 8266 exceptionState.throwIfNeeded(); |
8267 } | 8267 } |
8268 | 8268 |
8269 static void overloadedMethodJMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 8269 static void overloadedMethodJMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
8270 { | 8270 { |
8271 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 8271 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
8272 TestObjectV8Internal::overloadedMethodJMethod(info); | 8272 TestObjectV8Internal::overloadedMethodJMethod(info); |
8273 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 8273 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
8274 } | 8274 } |
8275 | 8275 |
| 8276 static void overloadedMethodK1Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 8277 { |
| 8278 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8279 ScriptValue functionArg; |
| 8280 { |
| 8281 functionArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[
0]); |
| 8282 } |
| 8283 impl->overloadedMethodK(functionArg); |
| 8284 } |
| 8285 |
| 8286 static void overloadedMethodK2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) |
| 8287 { |
| 8288 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 8289 V8StringResource<> stringArg; |
| 8290 { |
| 8291 TOSTRING_VOID_INTERNAL(stringArg, info[0]); |
| 8292 } |
| 8293 impl->overloadedMethodK(stringArg); |
| 8294 } |
| 8295 |
| 8296 static void overloadedMethodKMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
| 8297 { |
| 8298 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM
ethodK", "TestObject", info.Holder(), info.GetIsolate()); |
| 8299 switch (std::min(1, info.Length())) { |
| 8300 case 1: |
| 8301 if (info[0]->IsFunction()) { |
| 8302 overloadedMethodK1Method(info); |
| 8303 return; |
| 8304 } |
| 8305 if (true) { |
| 8306 overloadedMethodK2Method(info); |
| 8307 return; |
| 8308 } |
| 8309 break; |
| 8310 default: |
| 8311 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 8312 exceptionState.throwIfNeeded(); |
| 8313 return; |
| 8314 } |
| 8315 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
| 8316 exceptionState.throwIfNeeded(); |
| 8317 } |
| 8318 |
| 8319 static void overloadedMethodKMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| 8320 { |
| 8321 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 8322 TestObjectV8Internal::overloadedMethodKMethod(info); |
| 8323 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 8324 } |
| 8325 |
8276 static void promiseOverloadMethod1Method(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | 8326 static void promiseOverloadMethod1Method(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
8277 { | 8327 { |
8278 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 8328 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
8279 v8SetReturnValue(info, impl->promiseOverloadMethod().v8Value()); | 8329 v8SetReturnValue(info, impl->promiseOverloadMethod().v8Value()); |
8280 } | 8330 } |
8281 | 8331 |
8282 static void promiseOverloadMethod2Method(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | 8332 static void promiseOverloadMethod2Method(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
8283 { | 8333 { |
8284 ExceptionState exceptionState(ExceptionState::ExecutionContext, "promiseOver
loadMethod", "TestObject", info.Holder(), info.GetIsolate()); | 8334 ExceptionState exceptionState(ExceptionState::ExecutionContext, "promiseOver
loadMethod", "TestObject", info.Holder(), info.GetIsolate()); |
8285 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 8335 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
(...skipping 2388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10674 {"overloadedMethodA", TestObjectV8Internal::overloadedMethodAMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10724 {"overloadedMethodA", TestObjectV8Internal::overloadedMethodAMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10675 {"overloadedMethodB", TestObjectV8Internal::overloadedMethodBMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10725 {"overloadedMethodB", TestObjectV8Internal::overloadedMethodBMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10676 {"overloadedMethodC", TestObjectV8Internal::overloadedMethodCMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10726 {"overloadedMethodC", TestObjectV8Internal::overloadedMethodCMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10677 {"overloadedMethodD", TestObjectV8Internal::overloadedMethodDMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10727 {"overloadedMethodD", TestObjectV8Internal::overloadedMethodDMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10678 {"overloadedMethodE", TestObjectV8Internal::overloadedMethodEMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10728 {"overloadedMethodE", TestObjectV8Internal::overloadedMethodEMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10679 {"overloadedMethodF", TestObjectV8Internal::overloadedMethodFMethodCallback,
0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 10729 {"overloadedMethodF", TestObjectV8Internal::overloadedMethodFMethodCallback,
0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
10680 {"overloadedMethodG", TestObjectV8Internal::overloadedMethodGMethodCallback,
0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 10730 {"overloadedMethodG", TestObjectV8Internal::overloadedMethodGMethodCallback,
0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
10681 {"overloadedMethodH", TestObjectV8Internal::overloadedMethodHMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10731 {"overloadedMethodH", TestObjectV8Internal::overloadedMethodHMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10682 {"overloadedMethodI", TestObjectV8Internal::overloadedMethodIMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10732 {"overloadedMethodI", TestObjectV8Internal::overloadedMethodIMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10683 {"overloadedMethodJ", TestObjectV8Internal::overloadedMethodJMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10733 {"overloadedMethodJ", TestObjectV8Internal::overloadedMethodJMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
| 10734 {"overloadedMethodK", TestObjectV8Internal::overloadedMethodKMethodCallback,
0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10684 {"promiseOverloadMethod", TestObjectV8Internal::promiseOverloadMethodMethodC
allback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 10735 {"promiseOverloadMethod", TestObjectV8Internal::promiseOverloadMethodMethodC
allback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
10685 {"overloadedPerWorldBindingsMethod", TestObjectV8Internal::overloadedPerWorl
dBindingsMethodMethodCallback, TestObjectV8Internal::overloadedPerWorldBindingsM
ethodMethodCallbackForMainWorld, 0, V8DOMConfiguration::ExposedToAllScripts}, | 10736 {"overloadedPerWorldBindingsMethod", TestObjectV8Internal::overloadedPerWorl
dBindingsMethodMethodCallback, TestObjectV8Internal::overloadedPerWorldBindingsM
ethodMethodCallbackForMainWorld, 0, V8DOMConfiguration::ExposedToAllScripts}, |
10686 {"voidMethodClampUnsignedShortArg", TestObjectV8Internal::voidMethodClampUns
ignedShortArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10737 {"voidMethodClampUnsignedShortArg", TestObjectV8Internal::voidMethodClampUns
ignedShortArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10687 {"voidMethodClampUnsignedLongArg", TestObjectV8Internal::voidMethodClampUnsi
gnedLongArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10738 {"voidMethodClampUnsignedLongArg", TestObjectV8Internal::voidMethodClampUnsi
gnedLongArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10688 {"voidMethodDefaultUndefinedTestInterfaceEmptyArg", TestObjectV8Internal::vo
idMethodDefaultUndefinedTestInterfaceEmptyArgMethodCallback, 0, 0, V8DOMConfigur
ation::ExposedToAllScripts}, | 10739 {"voidMethodDefaultUndefinedTestInterfaceEmptyArg", TestObjectV8Internal::vo
idMethodDefaultUndefinedTestInterfaceEmptyArgMethodCallback, 0, 0, V8DOMConfigur
ation::ExposedToAllScripts}, |
10689 {"voidMethodDefaultUndefinedLongArg", TestObjectV8Internal::voidMethodDefaul
tUndefinedLongArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, | 10740 {"voidMethodDefaultUndefinedLongArg", TestObjectV8Internal::voidMethodDefaul
tUndefinedLongArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, |
10690 {"voidMethodDefaultUndefinedStringArg", TestObjectV8Internal::voidMethodDefa
ultUndefinedStringArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScrip
ts}, | 10741 {"voidMethodDefaultUndefinedStringArg", TestObjectV8Internal::voidMethodDefa
ultUndefinedStringArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScrip
ts}, |
10691 {"voidMethodEnforceRangeLongArg", TestObjectV8Internal::voidMethodEnforceRan
geLongArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, | 10742 {"voidMethodEnforceRangeLongArg", TestObjectV8Internal::voidMethodEnforceRan
geLongArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, |
10692 {"voidMethodTreatNullAsEmptyStringStringArg", TestObjectV8Internal::voidMeth
odTreatNullAsEmptyStringStringArgMethodCallback, 0, 1, V8DOMConfiguration::Expos
edToAllScripts}, | 10743 {"voidMethodTreatNullAsEmptyStringStringArg", TestObjectV8Internal::voidMeth
odTreatNullAsEmptyStringStringArgMethodCallback, 0, 1, V8DOMConfiguration::Expos
edToAllScripts}, |
10693 {"voidMethodTreatNullAsNullStringStringArg", TestObjectV8Internal::voidMetho
dTreatNullAsNullStringStringArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed
ToAllScripts}, | 10744 {"voidMethodTreatNullAsNullStringStringArg", TestObjectV8Internal::voidMetho
dTreatNullAsNullStringStringArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed
ToAllScripts}, |
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11415 return false; | 11466 return false; |
11416 | 11467 |
11417 ScriptState::Scope scope(scriptState); | 11468 ScriptState::Scope scope(scriptState); |
11418 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); | 11469 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob
al(), scriptState->isolate()); |
11419 | 11470 |
11420 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; | 11471 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate
Script", "TestObject", scriptState->context()->Global(), scriptState->isolate())
; |
11421 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); | 11472 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn
UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->
isolate(), cppValue)); |
11422 } | 11473 } |
11423 | 11474 |
11424 } // namespace blink | 11475 } // namespace blink |
OLD | NEW |