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

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

Issue 587653002: IDL: Conversion to Dictionary is trivial (can't fail) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 months 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
« no previous file with comments | « Source/bindings/tests/results/core/V8TestInterfaceEventConstructor.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6573 matching lines...) Expand 10 before | Expand all | Expand 10 after
6584 Vector<String> variadic; 6584 Vector<String> variadic;
6585 { 6585 {
6586 v8::TryCatch block; 6586 v8::TryCatch block;
6587 V8RethrowTryCatchScope rethrow(block); 6587 V8RethrowTryCatchScope rethrow(block);
6588 TONATIVE_VOID_EXCEPTIONSTATE_PROMISE_INTERNAL(arg1, toInt32(info[0], exc eptionState), exceptionState, info, ScriptState::current(info.GetIsolate())); 6588 TONATIVE_VOID_EXCEPTIONSTATE_PROMISE_INTERNAL(arg1, toInt32(info[0], exc eptionState), exceptionState, info, ScriptState::current(info.GetIsolate()));
6589 if (!isUndefinedOrNull(info[1]) && !info[1]->IsObject()) { 6589 if (!isUndefinedOrNull(info[1]) && !info[1]->IsObject()) {
6590 exceptionState.throwTypeError("parameter 2 ('arg2') is not an object ."); 6590 exceptionState.throwTypeError("parameter 2 ('arg2') is not an object .");
6591 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(in fo.GetIsolate())).v8Value()); 6591 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(in fo.GetIsolate())).v8Value());
6592 return; 6592 return;
6593 } 6593 }
6594 TONATIVE_VOID_PROMISE_INTERNAL(arg2, Dictionary(info[1], info.GetIsolate ()), info); 6594 arg2 = Dictionary(info[1], info.GetIsolate());
6595 TOSTRING_VOID_PROMISE_INTERNAL(arg3, info[2], info); 6595 TOSTRING_VOID_PROMISE_INTERNAL(arg3, info[2], info);
6596 TONATIVE_VOID_PROMISE_INTERNAL(variadic, toImplArguments<String>(info, 3 ), info); 6596 TONATIVE_VOID_PROMISE_INTERNAL(variadic, toImplArguments<String>(info, 3 ), info);
6597 } 6597 }
6598 v8SetReturnValue(info, impl->promiseMethod(arg1, arg2, arg3, variadic).v8Val ue()); 6598 v8SetReturnValue(info, impl->promiseMethod(arg1, arg2, arg3, variadic).v8Val ue());
6599 } 6599 }
6600 6600
6601 static void promiseMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value >& info) 6601 static void promiseMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value >& info)
6602 { 6602 {
6603 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6603 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6604 TestObjectV8Internal::promiseMethodMethod(info); 6604 TestObjectV8Internal::promiseMethodMethod(info);
6605 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6605 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6606 } 6606 }
6607 6607
6608 static void promiseMethodWithoutExceptionStateMethod(const v8::FunctionCallbackI nfo<v8::Value>& info) 6608 static void promiseMethodWithoutExceptionStateMethod(const v8::FunctionCallbackI nfo<v8::Value>& info)
6609 { 6609 {
6610 if (UNLIKELY(info.Length() < 1)) { 6610 if (UNLIKELY(info.Length() < 1)) {
6611 v8SetReturnValue(info, ScriptPromise::rejectRaw(info.GetIsolate(), creat eMinimumArityTypeErrorForMethod("promiseMethodWithoutExceptionState", "TestObjec t", 1, info.Length(), info.GetIsolate()))); 6611 v8SetReturnValue(info, ScriptPromise::rejectRaw(info.GetIsolate(), creat eMinimumArityTypeErrorForMethod("promiseMethodWithoutExceptionState", "TestObjec t", 1, info.Length(), info.GetIsolate())));
6612 return; 6612 return;
6613 } 6613 }
6614 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6614 TestObject* impl = V8TestObject::toImpl(info.Holder());
6615 Dictionary arg1; 6615 Dictionary arg1;
6616 { 6616 {
6617 v8::TryCatch block;
6618 V8RethrowTryCatchScope rethrow(block);
6619 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { 6617 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) {
6620 v8SetReturnValue(info, ScriptPromise::rejectRaw(info.GetIsolate(), V 8ThrowException::createTypeError(ExceptionMessages::failedToExecute("promiseMeth odWithoutExceptionState", "TestObject", "parameter 1 ('arg1') is not an object." ), info.GetIsolate()))); 6618 v8SetReturnValue(info, ScriptPromise::rejectRaw(info.GetIsolate(), V 8ThrowException::createTypeError(ExceptionMessages::failedToExecute("promiseMeth odWithoutExceptionState", "TestObject", "parameter 1 ('arg1') is not an object." ), info.GetIsolate())));
6621 return; 6619 return;
6622 } 6620 }
6623 TONATIVE_VOID_PROMISE_INTERNAL(arg1, Dictionary(info[0], info.GetIsolate ()), info); 6621 arg1 = Dictionary(info[0], info.GetIsolate());
6624 } 6622 }
6625 v8SetReturnValue(info, impl->promiseMethodWithoutExceptionState(arg1).v8Valu e()); 6623 v8SetReturnValue(info, impl->promiseMethodWithoutExceptionState(arg1).v8Valu e());
6626 } 6624 }
6627 6625
6628 static void promiseMethodWithoutExceptionStateMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info) 6626 static void promiseMethodWithoutExceptionStateMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info)
6629 { 6627 {
6630 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6628 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6631 TestObjectV8Internal::promiseMethodWithoutExceptionStateMethod(info); 6629 TestObjectV8Internal::promiseMethodWithoutExceptionStateMethod(info);
6632 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6630 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6633 } 6631 }
(...skipping 26 matching lines...) Expand all
6660 6658
6661 static void voidMethodDictionaryArgMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 6659 static void voidMethodDictionaryArgMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
6662 { 6660 {
6663 if (UNLIKELY(info.Length() < 1)) { 6661 if (UNLIKELY(info.Length() < 1)) {
6664 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodDictionaryArg", "TestObject", 1, info.Length(), info.GetIsolate()), inf o.GetIsolate()); 6662 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodDictionaryArg", "TestObject", 1, info.Length(), info.GetIsolate()), inf o.GetIsolate());
6665 return; 6663 return;
6666 } 6664 }
6667 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6665 TestObject* impl = V8TestObject::toImpl(info.Holder());
6668 Dictionary dictionaryArg; 6666 Dictionary dictionaryArg;
6669 { 6667 {
6670 v8::TryCatch block;
6671 V8RethrowTryCatchScope rethrow(block);
6672 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { 6668 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) {
6673 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute( "voidMethodDictionaryArg", "TestObject", "parameter 1 ('dictionaryArg') is not a n object."), info.GetIsolate()); 6669 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute( "voidMethodDictionaryArg", "TestObject", "parameter 1 ('dictionaryArg') is not a n object."), info.GetIsolate());
6674 return; 6670 return;
6675 } 6671 }
6676 TONATIVE_VOID_INTERNAL(dictionaryArg, Dictionary(info[0], info.GetIsolat e())); 6672 dictionaryArg = Dictionary(info[0], info.GetIsolate());
6677 } 6673 }
6678 impl->voidMethodDictionaryArg(dictionaryArg); 6674 impl->voidMethodDictionaryArg(dictionaryArg);
6679 } 6675 }
6680 6676
6681 static void voidMethodDictionaryArgMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 6677 static void voidMethodDictionaryArgMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
6682 { 6678 {
6683 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6679 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6684 TestObjectV8Internal::voidMethodDictionaryArgMethod(info); 6680 TestObjectV8Internal::voidMethodDictionaryArgMethod(info);
6685 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6681 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6686 } 6682 }
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
7138 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 7134 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
7139 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(i nfo); 7135 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(i nfo);
7140 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 7136 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
7141 } 7137 }
7142 7138
7143 static void voidMethodOptionalDictionaryArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info) 7139 static void voidMethodOptionalDictionaryArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info)
7144 { 7140 {
7145 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7141 TestObject* impl = V8TestObject::toImpl(info.Holder());
7146 Dictionary optionalDictionaryArg; 7142 Dictionary optionalDictionaryArg;
7147 { 7143 {
7148 v8::TryCatch block;
7149 V8RethrowTryCatchScope rethrow(block);
7150 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { 7144 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) {
7151 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute( "voidMethodOptionalDictionaryArg", "TestObject", "parameter 1 ('optionalDictiona ryArg') is not an object."), info.GetIsolate()); 7145 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute( "voidMethodOptionalDictionaryArg", "TestObject", "parameter 1 ('optionalDictiona ryArg') is not an object."), info.GetIsolate());
7152 return; 7146 return;
7153 } 7147 }
7154 TONATIVE_VOID_INTERNAL(optionalDictionaryArg, Dictionary(info[0], info.G etIsolate())); 7148 optionalDictionaryArg = Dictionary(info[0], info.GetIsolate());
7155 } 7149 }
7156 impl->voidMethodOptionalDictionaryArg(optionalDictionaryArg); 7150 impl->voidMethodOptionalDictionaryArg(optionalDictionaryArg);
7157 } 7151 }
7158 7152
7159 static void voidMethodOptionalDictionaryArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info) 7153 static void voidMethodOptionalDictionaryArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info)
7160 { 7154 {
7161 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 7155 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
7162 TestObjectV8Internal::voidMethodOptionalDictionaryArgMethod(info); 7156 TestObjectV8Internal::voidMethodOptionalDictionaryArgMethod(info);
7163 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 7157 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
7164 } 7158 }
(...skipping 3953 matching lines...) Expand 10 before | Expand all | Expand 10 after
11118 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "enumF orPrivateScript", holder, v8String(scriptState->isolate(), cppValue)); 11112 PrivateScriptRunner::runDOMAttributeSetter(scriptState, "TestObject", "enumF orPrivateScript", holder, v8String(scriptState->isolate(), cppValue));
11119 if (block.HasCaught()) { 11113 if (block.HasCaught()) {
11120 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat e(), exceptionState, block); 11114 PrivateScriptRunner::rethrowExceptionInPrivateScript(scriptState->isolat e(), exceptionState, block);
11121 block.ReThrow(); 11115 block.ReThrow();
11122 return false; 11116 return false;
11123 } 11117 }
11124 return true; 11118 return true;
11125 } 11119 }
11126 11120
11127 } // namespace blink 11121 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/core/V8TestInterfaceEventConstructor.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698