Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Side by Side Diff: Source/bindings/tests/results/core/V8TestObject.cpp

Issue 713683003: IDL: Support optional union type arguments with default values (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add unit tests Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 7467 matching lines...) Expand 10 before | Expand all | Expand 10 after
7478 impl->voidMethodDefaultNullableTestInterfaceArg(defaultTestInterfaceArg); 7478 impl->voidMethodDefaultNullableTestInterfaceArg(defaultTestInterfaceArg);
7479 } 7479 }
7480 7480
7481 static void voidMethodDefaultNullableTestInterfaceArgMethodCallback(const v8::Fu nctionCallbackInfo<v8::Value>& info) 7481 static void voidMethodDefaultNullableTestInterfaceArgMethodCallback(const v8::Fu nctionCallbackInfo<v8::Value>& info)
7482 { 7482 {
7483 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 7483 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
7484 TestObjectV8Internal::voidMethodDefaultNullableTestInterfaceArgMethod(info); 7484 TestObjectV8Internal::voidMethodDefaultNullableTestInterfaceArgMethod(info);
7485 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 7485 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
7486 } 7486 }
7487 7487
7488 static void voidMethodDefaultDoubleOrStringArgsMethod(const v8::FunctionCallback Info<v8::Value>& info)
7489 {
7490 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD efaultDoubleOrStringArgs", "TestObject", info.Holder(), info.GetIsolate());
7491 TestObject* impl = V8TestObject::toImpl(info.Holder());
7492 DoubleOrString defaultLongArg;
7493 DoubleOrString defaultStringArg;
7494 DoubleOrString defaultNullArg;
7495 {
7496 if (!info[0]->IsUndefined()) {
7497 TONATIVE_VOID_EXCEPTIONSTATE_ARGINTERNAL(V8DoubleOrString::toImpl(in fo.GetIsolate(), info[0], defaultLongArg, exceptionState), exceptionState);
7498 } else {
7499 defaultLongArg.setDouble(10);
7500 }
7501 if (!info[1]->IsUndefined()) {
7502 TONATIVE_VOID_EXCEPTIONSTATE_ARGINTERNAL(V8DoubleOrStringOrNull::toI mpl(info.GetIsolate(), info[1], defaultStringArg, exceptionState), exceptionStat e);
7503 } else {
7504 defaultStringArg.setString(String("foo"));
7505 }
7506 if (!info[2]->IsUndefined()) {
7507 TONATIVE_VOID_EXCEPTIONSTATE_ARGINTERNAL(V8DoubleOrStringOrNull::toI mpl(info.GetIsolate(), info[2], defaultNullArg, exceptionState), exceptionState) ;
7508 } else {
7509 /* null default value */;
7510 }
7511 }
7512 impl->voidMethodDefaultDoubleOrStringArgs(defaultLongArg, defaultStringArg, defaultNullArg);
7513 }
7514
7515 static void voidMethodDefaultDoubleOrStringArgsMethodCallback(const v8::Function CallbackInfo<v8::Value>& info)
7516 {
7517 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
7518 TestObjectV8Internal::voidMethodDefaultDoubleOrStringArgsMethod(info);
7519 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
7520 }
7521
7488 static void voidMethodVariadicStringArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info) 7522 static void voidMethodVariadicStringArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info)
7489 { 7523 {
7490 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodV ariadicStringArg", "TestObject", info.Holder(), info.GetIsolate()); 7524 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodV ariadicStringArg", "TestObject", info.Holder(), info.GetIsolate());
7491 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7525 TestObject* impl = V8TestObject::toImpl(info.Holder());
7492 Vector<String> variadicStringArgs; 7526 Vector<String> variadicStringArgs;
7493 { 7527 {
7494 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(variadicStringArgs, toImplArgument s<String>(info, 0, exceptionState), exceptionState); 7528 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(variadicStringArgs, toImplArgument s<String>(info, 0, exceptionState), exceptionState);
7495 } 7529 }
7496 impl->voidMethodVariadicStringArg(variadicStringArgs); 7530 impl->voidMethodVariadicStringArg(variadicStringArgs);
7497 } 7531 }
(...skipping 3101 matching lines...) Expand 10 before | Expand all | Expand 10 after
10599 {"voidMethodOptionalDictionaryArg", TestObjectV8Internal::voidMethodOptional DictionaryArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 10633 {"voidMethodOptionalDictionaryArg", TestObjectV8Internal::voidMethodOptional DictionaryArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
10600 {"voidMethodDefaultByteStringArg", TestObjectV8Internal::voidMethodDefaultBy teStringArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 10634 {"voidMethodDefaultByteStringArg", TestObjectV8Internal::voidMethodDefaultBy teStringArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
10601 {"voidMethodDefaultStringArg", TestObjectV8Internal::voidMethodDefaultString ArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 10635 {"voidMethodDefaultStringArg", TestObjectV8Internal::voidMethodDefaultString ArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
10602 {"voidMethodDefaultIntegerArgs", TestObjectV8Internal::voidMethodDefaultInte gerArgsMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 10636 {"voidMethodDefaultIntegerArgs", TestObjectV8Internal::voidMethodDefaultInte gerArgsMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
10603 {"voidMethodDefaultDoubleArg", TestObjectV8Internal::voidMethodDefaultDouble ArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 10637 {"voidMethodDefaultDoubleArg", TestObjectV8Internal::voidMethodDefaultDouble ArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
10604 {"voidMethodDefaultTrueBooleanArg", TestObjectV8Internal::voidMethodDefaultT rueBooleanArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 10638 {"voidMethodDefaultTrueBooleanArg", TestObjectV8Internal::voidMethodDefaultT rueBooleanArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
10605 {"voidMethodDefaultFalseBooleanArg", TestObjectV8Internal::voidMethodDefault FalseBooleanArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 10639 {"voidMethodDefaultFalseBooleanArg", TestObjectV8Internal::voidMethodDefault FalseBooleanArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
10606 {"voidMethodDefaultNullableByteStringArg", TestObjectV8Internal::voidMethodD efaultNullableByteStringArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAl lScripts}, 10640 {"voidMethodDefaultNullableByteStringArg", TestObjectV8Internal::voidMethodD efaultNullableByteStringArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAl lScripts},
10607 {"voidMethodDefaultNullableStringArg", TestObjectV8Internal::voidMethodDefau ltNullableStringArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts }, 10641 {"voidMethodDefaultNullableStringArg", TestObjectV8Internal::voidMethodDefau ltNullableStringArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts },
10608 {"voidMethodDefaultNullableTestInterfaceArg", TestObjectV8Internal::voidMeth odDefaultNullableTestInterfaceArgMethodCallback, 0, 0, V8DOMConfiguration::Expos edToAllScripts}, 10642 {"voidMethodDefaultNullableTestInterfaceArg", TestObjectV8Internal::voidMeth odDefaultNullableTestInterfaceArgMethodCallback, 0, 0, V8DOMConfiguration::Expos edToAllScripts},
10643 {"voidMethodDefaultDoubleOrStringArgs", TestObjectV8Internal::voidMethodDefa ultDoubleOrStringArgsMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScrip ts},
10609 {"voidMethodVariadicStringArg", TestObjectV8Internal::voidMethodVariadicStri ngArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 10644 {"voidMethodVariadicStringArg", TestObjectV8Internal::voidMethodVariadicStri ngArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
10610 {"voidMethodStringArgVariadicStringArg", TestObjectV8Internal::voidMethodStr ingArgVariadicStringArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScr ipts}, 10645 {"voidMethodStringArgVariadicStringArg", TestObjectV8Internal::voidMethodStr ingArgVariadicStringArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScr ipts},
10611 {"voidMethodVariadicTestInterfaceEmptyArg", TestObjectV8Internal::voidMethod VariadicTestInterfaceEmptyArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedTo AllScripts}, 10646 {"voidMethodVariadicTestInterfaceEmptyArg", TestObjectV8Internal::voidMethod VariadicTestInterfaceEmptyArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedTo AllScripts},
10612 {"voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg", TestObjectV 8Internal::voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethodCal lback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, 10647 {"voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg", TestObjectV 8Internal::voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethodCal lback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
10613 {"voidMethodVariadicTestInterfaceGarbageCollectedArg", TestObjectV8Internal: :voidMethodVariadicTestInterfaceGarbageCollectedArgMethodCallback, 0, 0, V8DOMCo nfiguration::ExposedToAllScripts}, 10648 {"voidMethodVariadicTestInterfaceGarbageCollectedArg", TestObjectV8Internal: :voidMethodVariadicTestInterfaceGarbageCollectedArgMethodCallback, 0, 0, V8DOMCo nfiguration::ExposedToAllScripts},
10614 {"voidMethodVariadicTestInterfaceWillBeGarbageCollectedArg", TestObjectV8Int ernal::voidMethodVariadicTestInterfaceWillBeGarbageCollectedArgMethodCallback, 0 , 0, V8DOMConfiguration::ExposedToAllScripts}, 10649 {"voidMethodVariadicTestInterfaceWillBeGarbageCollectedArg", TestObjectV8Int ernal::voidMethodVariadicTestInterfaceWillBeGarbageCollectedArgMethodCallback, 0 , 0, V8DOMConfiguration::ExposedToAllScripts},
10615 {"overloadedMethodA", TestObjectV8Internal::overloadedMethodAMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, 10650 {"overloadedMethodA", TestObjectV8Internal::overloadedMethodAMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
10616 {"overloadedMethodB", TestObjectV8Internal::overloadedMethodBMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, 10651 {"overloadedMethodB", TestObjectV8Internal::overloadedMethodBMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
10617 {"overloadedMethodC", TestObjectV8Internal::overloadedMethodCMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, 10652 {"overloadedMethodC", TestObjectV8Internal::overloadedMethodCMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
10618 {"overloadedMethodD", TestObjectV8Internal::overloadedMethodDMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, 10653 {"overloadedMethodD", TestObjectV8Internal::overloadedMethodDMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
11356 return false; 11391 return false;
11357 11392
11358 ScriptState::Scope scope(scriptState); 11393 ScriptState::Scope scope(scriptState);
11359 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob al(), scriptState->isolate()); 11394 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob al(), scriptState->isolate());
11360 11395
11361 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate Script", "TestObject", scriptState->context()->Global(), scriptState->isolate()) ; 11396 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate Script", "TestObject", scriptState->context()->Global(), scriptState->isolate()) ;
11362 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState-> isolate(), cppValue)); 11397 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState-> isolate(), cppValue));
11363 } 11398 }
11364 11399
11365 } // namespace blink 11400 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698