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

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

Issue 680193003: IDL: Generate union type containers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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"
11 #include "bindings/core/v8/Dictionary.h" 11 #include "bindings/core/v8/Dictionary.h"
12 #include "bindings/core/v8/ExceptionState.h" 12 #include "bindings/core/v8/ExceptionState.h"
13 #include "bindings/core/v8/PrivateScriptRunner.h" 13 #include "bindings/core/v8/PrivateScriptRunner.h"
14 #include "bindings/core/v8/ScriptCallStackFactory.h" 14 #include "bindings/core/v8/ScriptCallStackFactory.h"
15 #include "bindings/core/v8/ScriptPromise.h" 15 #include "bindings/core/v8/ScriptPromise.h"
16 #include "bindings/core/v8/ScriptState.h" 16 #include "bindings/core/v8/ScriptState.h"
17 #include "bindings/core/v8/ScriptValue.h" 17 #include "bindings/core/v8/ScriptValue.h"
18 #include "bindings/core/v8/SerializedScriptValue.h" 18 #include "bindings/core/v8/SerializedScriptValue.h"
19 #include "bindings/core/v8/UnionTypesCore.h"
19 #include "bindings/core/v8/V8AbstractEventListener.h" 20 #include "bindings/core/v8/V8AbstractEventListener.h"
20 #include "bindings/core/v8/V8ArrayBuffer.h" 21 #include "bindings/core/v8/V8ArrayBuffer.h"
21 #include "bindings/core/v8/V8ArrayBufferView.h" 22 #include "bindings/core/v8/V8ArrayBufferView.h"
22 #include "bindings/core/v8/V8Attr.h" 23 #include "bindings/core/v8/V8Attr.h"
23 #include "bindings/core/v8/V8DOMActivityLogger.h" 24 #include "bindings/core/v8/V8DOMActivityLogger.h"
24 #include "bindings/core/v8/V8DOMConfiguration.h" 25 #include "bindings/core/v8/V8DOMConfiguration.h"
25 #include "bindings/core/v8/V8Document.h" 26 #include "bindings/core/v8/V8Document.h"
26 #include "bindings/core/v8/V8DocumentFragment.h" 27 #include "bindings/core/v8/V8DocumentFragment.h"
27 #include "bindings/core/v8/V8DocumentType.h" 28 #include "bindings/core/v8/V8DocumentType.h"
28 #include "bindings/core/v8/V8Element.h" 29 #include "bindings/core/v8/V8Element.h"
(...skipping 6298 matching lines...) Expand 10 before | Expand all | Expand 10 after
6327 static void nullableLongSequenceMethodMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info) 6328 static void nullableLongSequenceMethodMethodCallback(const v8::FunctionCallbackI nfo<v8::Value>& info)
6328 { 6329 {
6329 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6330 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6330 TestObjectV8Internal::nullableLongSequenceMethodMethod(info); 6331 TestObjectV8Internal::nullableLongSequenceMethodMethod(info);
6331 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6332 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6332 } 6333 }
6333 6334
6334 static void testInterfaceGarbageCollectedOrDOMStringMethodMethod(const v8::Funct ionCallbackInfo<v8::Value>& info) 6335 static void testInterfaceGarbageCollectedOrDOMStringMethodMethod(const v8::Funct ionCallbackInfo<v8::Value>& info)
6335 { 6336 {
6336 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6337 TestObject* impl = V8TestObject::toImpl(info.Holder());
6337 RawPtr<TestInterfaceGarbageCollected> result0 = nullptr; 6338 TestInterfaceGarbageCollectedOrString result;
6338 String result1; 6339 impl->testInterfaceGarbageCollectedOrDOMStringMethod(result);
6339 impl->testInterfaceGarbageCollectedOrDOMStringMethod(result0, result1); 6340 v8SetReturnValue(info, result);
6340 if (result0) {
6341 v8SetReturnValue(info, result0.release());
6342 return;
6343 }
6344 if (!result1.isNull()) {
6345 v8SetReturnValueString(info, result1, info.GetIsolate());
6346 return;
6347 }
6348 v8SetReturnValueNull(info);
6349 } 6341 }
6350 6342
6351 static void testInterfaceGarbageCollectedOrDOMStringMethodMethodCallback(const v 8::FunctionCallbackInfo<v8::Value>& info) 6343 static void testInterfaceGarbageCollectedOrDOMStringMethodMethodCallback(const v 8::FunctionCallbackInfo<v8::Value>& info)
6352 { 6344 {
6353 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6345 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6354 TestObjectV8Internal::testInterfaceGarbageCollectedOrDOMStringMethodMethod(i nfo); 6346 TestObjectV8Internal::testInterfaceGarbageCollectedOrDOMStringMethodMethod(i nfo);
6355 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6347 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6356 } 6348 }
6357 6349
6358 static void testInterfaceWillBeGarbageCollectedOrTestDictionaryMethodMethod(cons t v8::FunctionCallbackInfo<v8::Value>& info) 6350 static void testInterfaceWillBeGarbageCollectedOrTestDictionaryMethodMethod(cons t v8::FunctionCallbackInfo<v8::Value>& info)
6359 { 6351 {
6360 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6352 TestObject* impl = V8TestObject::toImpl(info.Holder());
6361 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> result0 = nullptr; 6353 TestInterfaceWillBeGarbageCollectedOrTestDictionary result;
6362 Nullable<TestDictionary> result1; 6354 impl->testInterfaceWillBeGarbageCollectedOrTestDictionaryMethod(result);
6363 impl->testInterfaceWillBeGarbageCollectedOrTestDictionaryMethod(result0, res ult1); 6355 v8SetReturnValue(info, result);
6364 if (result0) {
6365 v8SetReturnValue(info, result0.release());
6366 return;
6367 }
6368 if (result1) {
6369 v8SetReturnValue(info, result);
6370 return;
6371 }
6372 v8SetReturnValueNull(info);
6373 } 6356 }
6374 6357
6375 static void testInterfaceWillBeGarbageCollectedOrTestDictionaryMethodMethodCallb ack(const v8::FunctionCallbackInfo<v8::Value>& info) 6358 static void testInterfaceWillBeGarbageCollectedOrTestDictionaryMethodMethodCallb ack(const v8::FunctionCallbackInfo<v8::Value>& info)
6376 { 6359 {
6377 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6360 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6378 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedOrTestDictionaryMet hodMethod(info); 6361 TestObjectV8Internal::testInterfaceWillBeGarbageCollectedOrTestDictionaryMet hodMethod(info);
6379 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6362 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6380 } 6363 }
6381 6364
6382 static void longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethodMethod(const v 8::FunctionCallbackInfo<v8::Value>& info) 6365 static void booleanOrDOMStringOrUnrestrictedDoubleMethodMethod(const v8::Functio nCallbackInfo<v8::Value>& info)
6383 { 6366 {
6384 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6367 TestObject* impl = V8TestObject::toImpl(info.Holder());
6385 Nullable<Vector<int> > result0; 6368 BooleanOrStringOrUnrestrictedDouble result;
6386 Nullable<Vector<String> > result1; 6369 impl->booleanOrDOMStringOrUnrestrictedDoubleMethod(result);
6387 Nullable<double> result2; 6370 v8SetReturnValue(info, result);
6388 impl->longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethod(result0, result 1, result2);
6389 if (result0) {
6390 v8SetReturnValue(info, v8Array(result0.get(), info.Holder(), info.GetIso late()));
6391 return;
6392 }
6393 if (result1) {
6394 v8SetReturnValue(info, v8Array(result1.get(), info.Holder(), info.GetIso late()));
6395 return;
6396 }
6397 if (result2) {
6398 v8SetReturnValue(info, result2.get());
6399 return;
6400 }
6401 v8SetReturnValueNull(info);
6402 } 6371 }
6403 6372
6404 static void longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethodMethodCallback (const v8::FunctionCallbackInfo<v8::Value>& info) 6373 static void booleanOrDOMStringOrUnrestrictedDoubleMethodMethodCallback(const v8: :FunctionCallbackInfo<v8::Value>& info)
6405 { 6374 {
6406 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6375 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6407 TestObjectV8Internal::longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethod Method(info); 6376 TestObjectV8Internal::booleanOrDOMStringOrUnrestrictedDoubleMethodMethod(inf o);
6408 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6377 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6409 } 6378 }
6410 6379
6380 static void testInterfaceOrLongMethodMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
6381 {
6382 TestObject* impl = V8TestObject::toImpl(info.Holder());
6383 TestInterfaceOrLong result;
6384 impl->testInterfaceOrLongMethod(result);
6385 v8SetReturnValue(info, result);
6386 }
6387
6388 static void testInterfaceOrLongMethodMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
6389 {
6390 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6391 TestObjectV8Internal::testInterfaceOrLongMethodMethod(info);
6392 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6393 }
6394
6411 static void voidMethodTestInterfaceEmptyOrNullArgMethod(const v8::FunctionCallba ckInfo<v8::Value>& info) 6395 static void voidMethodTestInterfaceEmptyOrNullArgMethod(const v8::FunctionCallba ckInfo<v8::Value>& info)
6412 { 6396 {
6413 if (UNLIKELY(info.Length() < 1)) { 6397 if (UNLIKELY(info.Length() < 1)) {
6414 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodTestInterfaceEmptyOrNullArg", "TestObject", 1, info.Length(), info.GetI solate()), info.GetIsolate()); 6398 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodTestInterfaceEmptyOrNullArg", "TestObject", 1, info.Length(), info.GetI solate()), info.GetIsolate());
6415 return; 6399 return;
6416 } 6400 }
6417 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6401 TestObject* impl = V8TestObject::toImpl(info.Holder());
6418 TestInterfaceEmpty* nullableTestInterfaceEmptyArg; 6402 TestInterfaceEmpty* nullableTestInterfaceEmptyArg;
6419 { 6403 {
6420 nullableTestInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeChec k(info.GetIsolate(), info[0]); 6404 nullableTestInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeChec k(info.GetIsolate(), info[0]);
(...skipping 3954 matching lines...) Expand 10 before | Expand all | Expand 10 after
10375 {"voidMethodSequenceLongArg", TestObjectV8Internal::voidMethodSequenceLongAr gMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, 10359 {"voidMethodSequenceLongArg", TestObjectV8Internal::voidMethodSequenceLongAr gMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
10376 {"voidMethodSequenceStringArg", TestObjectV8Internal::voidMethodSequenceStri ngArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, 10360 {"voidMethodSequenceStringArg", TestObjectV8Internal::voidMethodSequenceStri ngArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
10377 {"voidMethodSequenceTestInterfaceEmptyArg", TestObjectV8Internal::voidMethod SequenceTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedTo AllScripts}, 10361 {"voidMethodSequenceTestInterfaceEmptyArg", TestObjectV8Internal::voidMethod SequenceTestInterfaceEmptyArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedTo AllScripts},
10378 {"voidMethodSequenceSequenceDOMStringArg", TestObjectV8Internal::voidMethodS equenceSequenceDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAl lScripts}, 10362 {"voidMethodSequenceSequenceDOMStringArg", TestObjectV8Internal::voidMethodS equenceSequenceDOMStringArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAl lScripts},
10379 {"nullableLongMethod", TestObjectV8Internal::nullableLongMethodMethodCallbac k, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 10363 {"nullableLongMethod", TestObjectV8Internal::nullableLongMethodMethodCallbac k, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
10380 {"nullableStringMethod", TestObjectV8Internal::nullableStringMethodMethodCal lback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 10364 {"nullableStringMethod", TestObjectV8Internal::nullableStringMethodMethodCal lback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
10381 {"nullableTestInterfaceMethod", TestObjectV8Internal::nullableTestInterfaceM ethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 10365 {"nullableTestInterfaceMethod", TestObjectV8Internal::nullableTestInterfaceM ethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
10382 {"nullableLongSequenceMethod", TestObjectV8Internal::nullableLongSequenceMet hodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 10366 {"nullableLongSequenceMethod", TestObjectV8Internal::nullableLongSequenceMet hodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
10383 {"testInterfaceGarbageCollectedOrDOMStringMethod", TestObjectV8Internal::tes tInterfaceGarbageCollectedOrDOMStringMethodMethodCallback, 0, 0, V8DOMConfigurat ion::ExposedToAllScripts}, 10367 {"testInterfaceGarbageCollectedOrDOMStringMethod", TestObjectV8Internal::tes tInterfaceGarbageCollectedOrDOMStringMethodMethodCallback, 0, 0, V8DOMConfigurat ion::ExposedToAllScripts},
10384 {"testInterfaceWillBeGarbageCollectedOrTestDictionaryMethod", TestObjectV8In ternal::testInterfaceWillBeGarbageCollectedOrTestDictionaryMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 10368 {"testInterfaceWillBeGarbageCollectedOrTestDictionaryMethod", TestObjectV8In ternal::testInterfaceWillBeGarbageCollectedOrTestDictionaryMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
10385 {"longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethod", TestObjectV8Inter nal::longSequenceOrDOMStringArrayOrUnrestrictedDoubleMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 10369 {"booleanOrDOMStringOrUnrestrictedDoubleMethod", TestObjectV8Internal::boole anOrDOMStringOrUnrestrictedDoubleMethodMethodCallback, 0, 0, V8DOMConfiguration: :ExposedToAllScripts},
10370 {"testInterfaceOrLongMethod", TestObjectV8Internal::testInterfaceOrLongMetho dMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
10386 {"voidMethodTestInterfaceEmptyOrNullArg", TestObjectV8Internal::voidMethodTe stInterfaceEmptyOrNullArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllS cripts}, 10371 {"voidMethodTestInterfaceEmptyOrNullArg", TestObjectV8Internal::voidMethodTe stInterfaceEmptyOrNullArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllS cripts},
10387 {"voidMethodTestCallbackInterfaceArg", TestObjectV8Internal::voidMethodTestC allbackInterfaceArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts }, 10372 {"voidMethodTestCallbackInterfaceArg", TestObjectV8Internal::voidMethodTestC allbackInterfaceArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts },
10388 {"voidMethodOptionalTestCallbackInterfaceArg", TestObjectV8Internal::voidMet hodOptionalTestCallbackInterfaceArgMethodCallback, 0, 0, V8DOMConfiguration::Exp osedToAllScripts}, 10373 {"voidMethodOptionalTestCallbackInterfaceArg", TestObjectV8Internal::voidMet hodOptionalTestCallbackInterfaceArgMethodCallback, 0, 0, V8DOMConfiguration::Exp osedToAllScripts},
10389 {"voidMethodTestCallbackInterfaceOrNullArg", TestObjectV8Internal::voidMetho dTestCallbackInterfaceOrNullArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed ToAllScripts}, 10374 {"voidMethodTestCallbackInterfaceOrNullArg", TestObjectV8Internal::voidMetho dTestCallbackInterfaceOrNullArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed ToAllScripts},
10390 {"testEnumMethod", TestObjectV8Internal::testEnumMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 10375 {"testEnumMethod", TestObjectV8Internal::testEnumMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
10391 {"voidMethodTestEnumArg", TestObjectV8Internal::voidMethodTestEnumArgMethodC allback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, 10376 {"voidMethodTestEnumArg", TestObjectV8Internal::voidMethodTestEnumArgMethodC allback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
10392 {"dictionaryMethod", TestObjectV8Internal::dictionaryMethodMethodCallback, 0 , 0, V8DOMConfiguration::ExposedToAllScripts}, 10377 {"dictionaryMethod", TestObjectV8Internal::dictionaryMethodMethodCallback, 0 , 0, V8DOMConfiguration::ExposedToAllScripts},
10393 {"testDictionaryMethod", TestObjectV8Internal::testDictionaryMethodMethodCal lback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 10378 {"testDictionaryMethod", TestObjectV8Internal::testDictionaryMethodMethodCal lback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
10394 {"nodeFilterMethod", TestObjectV8Internal::nodeFilterMethodMethodCallback, 0 , 0, V8DOMConfiguration::ExposedToAllScripts}, 10379 {"nodeFilterMethod", TestObjectV8Internal::nodeFilterMethodMethodCallback, 0 , 0, V8DOMConfiguration::ExposedToAllScripts},
10395 {"promiseMethod", TestObjectV8Internal::promiseMethodMethodCallback, 0, 3, V 8DOMConfiguration::ExposedToAllScripts}, 10380 {"promiseMethod", TestObjectV8Internal::promiseMethodMethodCallback, 0, 3, V 8DOMConfiguration::ExposedToAllScripts},
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
11173 return false; 11158 return false;
11174 11159
11175 ScriptState::Scope scope(scriptState); 11160 ScriptState::Scope scope(scriptState);
11176 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob al(), scriptState->isolate()); 11161 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob al(), scriptState->isolate());
11177 11162
11178 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate Script", "TestObject", scriptState->context()->Global(), scriptState->isolate()) ; 11163 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate Script", "TestObject", scriptState->context()->Global(), scriptState->isolate()) ;
11179 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState-> isolate(), cppValue)); 11164 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState-> isolate(), cppValue));
11180 } 11165 }
11181 11166
11182 } // namespace blink 11167 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698