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

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

Issue 709743002: Move the v8::Isolate* parameter to the first parameter of various binding methods in third_party/We… (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"
(...skipping 6484 matching lines...) Expand 10 before | Expand all | Expand 10 after
6495 static void voidMethodTestCallbackInterfaceArgMethod(const v8::FunctionCallbackI nfo<v8::Value>& info) 6495 static void voidMethodTestCallbackInterfaceArgMethod(const v8::FunctionCallbackI nfo<v8::Value>& info)
6496 { 6496 {
6497 if (UNLIKELY(info.Length() < 1)) { 6497 if (UNLIKELY(info.Length() < 1)) {
6498 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "voidMethodTestCallbackInterfaceArg", "TestObject", 1, info.Len gth()), info.GetIsolate()); 6498 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "voidMethodTestCallbackInterfaceArg", "TestObject", 1, info.Len gth()), info.GetIsolate());
6499 return; 6499 return;
6500 } 6500 }
6501 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6501 TestObject* impl = V8TestObject::toImpl(info.Holder());
6502 TestCallbackInterface* testCallbackInterfaceArg; 6502 TestCallbackInterface* testCallbackInterfaceArg;
6503 { 6503 {
6504 if (info.Length() <= 0 || !info[0]->IsFunction()) { 6504 if (info.Length() <= 0 || !info[0]->IsFunction()) {
6505 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute( "voidMethodTestCallbackInterfaceArg", "TestObject", "The callback provided as pa rameter 1 is not a function."), info.GetIsolate()); 6505 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodTestCallbackInterfaceArg", "TestObject", "The call back provided as parameter 1 is not a function."));
6506 return; 6506 return;
6507 } 6507 }
6508 testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8 ::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())); 6508 testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8 ::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate()));
6509 } 6509 }
6510 impl->voidMethodTestCallbackInterfaceArg(testCallbackInterfaceArg); 6510 impl->voidMethodTestCallbackInterfaceArg(testCallbackInterfaceArg);
6511 } 6511 }
6512 6512
6513 static void voidMethodTestCallbackInterfaceArgMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info) 6513 static void voidMethodTestCallbackInterfaceArgMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info)
6514 { 6514 {
6515 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6515 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6516 TestObjectV8Internal::voidMethodTestCallbackInterfaceArgMethod(info); 6516 TestObjectV8Internal::voidMethodTestCallbackInterfaceArgMethod(info);
6517 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6517 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6518 } 6518 }
6519 6519
6520 static void voidMethodOptionalTestCallbackInterfaceArgMethod(const v8::FunctionC allbackInfo<v8::Value>& info) 6520 static void voidMethodOptionalTestCallbackInterfaceArgMethod(const v8::FunctionC allbackInfo<v8::Value>& info)
6521 { 6521 {
6522 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6522 TestObject* impl = V8TestObject::toImpl(info.Holder());
6523 TestCallbackInterface* optionalTestCallbackInterfaceArg; 6523 TestCallbackInterface* optionalTestCallbackInterfaceArg;
6524 { 6524 {
6525 if (!isUndefinedOrNull(info[0])) { 6525 if (!isUndefinedOrNull(info[0])) {
6526 if (!info[0]->IsFunction()) { 6526 if (!info[0]->IsFunction()) {
6527 V8ThrowException::throwTypeError(ExceptionMessages::failedToExec ute("voidMethodOptionalTestCallbackInterfaceArg", "TestObject", "The callback pr ovided as parameter 1 is not a function."), info.GetIsolate()); 6527 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMes sages::failedToExecute("voidMethodOptionalTestCallbackInterfaceArg", "TestObject ", "The callback provided as parameter 1 is not a function."));
6528 return; 6528 return;
6529 } 6529 }
6530 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v 8::Handle<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())) ; 6530 optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v 8::Handle<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())) ;
6531 } else { 6531 } else {
6532 optionalTestCallbackInterfaceArg = nullptr; 6532 optionalTestCallbackInterfaceArg = nullptr;
6533 } 6533 }
6534 } 6534 }
6535 impl->voidMethodOptionalTestCallbackInterfaceArg(optionalTestCallbackInterfa ceArg); 6535 impl->voidMethodOptionalTestCallbackInterfaceArg(optionalTestCallbackInterfa ceArg);
6536 } 6536 }
6537 6537
6538 static void voidMethodOptionalTestCallbackInterfaceArgMethodCallback(const v8::F unctionCallbackInfo<v8::Value>& info) 6538 static void voidMethodOptionalTestCallbackInterfaceArgMethodCallback(const v8::F unctionCallbackInfo<v8::Value>& info)
6539 { 6539 {
6540 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6540 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6541 TestObjectV8Internal::voidMethodOptionalTestCallbackInterfaceArgMethod(info) ; 6541 TestObjectV8Internal::voidMethodOptionalTestCallbackInterfaceArgMethod(info) ;
6542 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 6542 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
6543 } 6543 }
6544 6544
6545 static void voidMethodTestCallbackInterfaceOrNullArgMethod(const v8::FunctionCal lbackInfo<v8::Value>& info) 6545 static void voidMethodTestCallbackInterfaceOrNullArgMethod(const v8::FunctionCal lbackInfo<v8::Value>& info)
6546 { 6546 {
6547 if (UNLIKELY(info.Length() < 1)) { 6547 if (UNLIKELY(info.Length() < 1)) {
6548 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "voidMethodTestCallbackInterfaceOrNullArg", "TestObject", 1, in fo.Length()), info.GetIsolate()); 6548 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "voidMethodTestCallbackInterfaceOrNullArg", "TestObject", 1, in fo.Length()), info.GetIsolate());
6549 return; 6549 return;
6550 } 6550 }
6551 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6551 TestObject* impl = V8TestObject::toImpl(info.Holder());
6552 TestCallbackInterface* testCallbackInterfaceArg; 6552 TestCallbackInterface* testCallbackInterfaceArg;
6553 { 6553 {
6554 if (info.Length() <= 0 || !(info[0]->IsFunction() || info[0]->IsNull())) { 6554 if (info.Length() <= 0 || !(info[0]->IsFunction() || info[0]->IsNull())) {
6555 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute( "voidMethodTestCallbackInterfaceOrNullArg", "TestObject", "The callback provided as parameter 1 is not a function."), info.GetIsolate()); 6555 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodTestCallbackInterfaceOrNullArg", "TestObject", "Th e callback provided as parameter 1 is not a function."));
6556 return; 6556 return;
6557 } 6557 }
6558 testCallbackInterfaceArg = info[0]->IsNull() ? nullptr : V8TestCallbackI nterface::create(v8::Handle<v8::Function>::Cast(info[0]), ScriptState::current(i nfo.GetIsolate())); 6558 testCallbackInterfaceArg = info[0]->IsNull() ? nullptr : V8TestCallbackI nterface::create(v8::Handle<v8::Function>::Cast(info[0]), ScriptState::current(i nfo.GetIsolate()));
6559 } 6559 }
6560 impl->voidMethodTestCallbackInterfaceOrNullArg(testCallbackInterfaceArg); 6560 impl->voidMethodTestCallbackInterfaceOrNullArg(testCallbackInterfaceArg);
6561 } 6561 }
6562 6562
6563 static void voidMethodTestCallbackInterfaceOrNullArgMethodCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info) 6563 static void voidMethodTestCallbackInterfaceOrNullArgMethodCallback(const v8::Fun ctionCallbackInfo<v8::Value>& info)
6564 { 6564 {
6565 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6565 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
(...skipping 19 matching lines...) Expand all
6585 if (UNLIKELY(info.Length() < 1)) { 6585 if (UNLIKELY(info.Length() < 1)) {
6586 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "voidMethodTestEnumArg", "TestObject", 1, info.Length()), info. GetIsolate()); 6586 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "voidMethodTestEnumArg", "TestObject", 1, info.Length()), info. GetIsolate());
6587 return; 6587 return;
6588 } 6588 }
6589 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6589 TestObject* impl = V8TestObject::toImpl(info.Holder());
6590 V8StringResource<> testEnumTypeArg; 6590 V8StringResource<> testEnumTypeArg;
6591 { 6591 {
6592 TOSTRING_VOID_INTERNAL(testEnumTypeArg, info[0]); 6592 TOSTRING_VOID_INTERNAL(testEnumTypeArg, info[0]);
6593 String string = testEnumTypeArg; 6593 String string = testEnumTypeArg;
6594 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" | | string == "EnumValue3")) { 6594 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" | | string == "EnumValue3")) {
6595 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute( "voidMethodTestEnumArg", "TestObject", "parameter 1 ('" + string + "') is not a valid enum value."), info.GetIsolate()); 6595 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodTestEnumArg", "TestObject", "parameter 1 ('" + str ing + "') is not a valid enum value."));
6596 return; 6596 return;
6597 } 6597 }
6598 } 6598 }
6599 impl->voidMethodTestEnumArg(testEnumTypeArg); 6599 impl->voidMethodTestEnumArg(testEnumTypeArg);
6600 } 6600 }
6601 6601
6602 static void voidMethodTestEnumArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info) 6602 static void voidMethodTestEnumArgMethodCallback(const v8::FunctionCallbackInfo<v 8::Value>& info)
6603 { 6603 {
6604 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6604 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6605 TestObjectV8Internal::voidMethodTestEnumArgMethod(info); 6605 TestObjectV8Internal::voidMethodTestEnumArgMethod(info);
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
6735 static void voidMethodDictionaryArgMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 6735 static void voidMethodDictionaryArgMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
6736 { 6736 {
6737 if (UNLIKELY(info.Length() < 1)) { 6737 if (UNLIKELY(info.Length() < 1)) {
6738 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "voidMethodDictionaryArg", "TestObject", 1, info.Length()), inf o.GetIsolate()); 6738 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "voidMethodDictionaryArg", "TestObject", 1, info.Length()), inf o.GetIsolate());
6739 return; 6739 return;
6740 } 6740 }
6741 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6741 TestObject* impl = V8TestObject::toImpl(info.Holder());
6742 Dictionary dictionaryArg; 6742 Dictionary dictionaryArg;
6743 { 6743 {
6744 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { 6744 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) {
6745 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute( "voidMethodDictionaryArg", "TestObject", "parameter 1 ('dictionaryArg') is not a n object."), info.GetIsolate()); 6745 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodDictionaryArg", "TestObject", "parameter 1 ('dicti onaryArg') is not an object."));
6746 return; 6746 return;
6747 } 6747 }
6748 dictionaryArg = Dictionary(info[0], info.GetIsolate()); 6748 dictionaryArg = Dictionary(info[0], info.GetIsolate());
6749 } 6749 }
6750 impl->voidMethodDictionaryArg(dictionaryArg); 6750 impl->voidMethodDictionaryArg(dictionaryArg);
6751 } 6751 }
6752 6752
6753 static void voidMethodDictionaryArgMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 6753 static void voidMethodDictionaryArgMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
6754 { 6754 {
6755 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6755 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
(...skipping 26 matching lines...) Expand all
6782 { 6782 {
6783 if (UNLIKELY(info.Length() < 1)) { 6783 if (UNLIKELY(info.Length() < 1)) {
6784 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "voidMethodPromiseArg", "TestObject", 1, info.Length()), info.G etIsolate()); 6784 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "voidMethodPromiseArg", "TestObject", 1, info.Length()), info.G etIsolate());
6785 return; 6785 return;
6786 } 6786 }
6787 TestObject* impl = V8TestObject::toImpl(info.Holder()); 6787 TestObject* impl = V8TestObject::toImpl(info.Holder());
6788 ScriptPromise promiseArg; 6788 ScriptPromise promiseArg;
6789 { 6789 {
6790 promiseArg = ScriptPromise::cast(ScriptState::current(info.GetIsolate()) , info[0]); 6790 promiseArg = ScriptPromise::cast(ScriptState::current(info.GetIsolate()) , info[0]);
6791 if (!promiseArg.isUndefinedOrNull() && !promiseArg.isObject()) { 6791 if (!promiseArg.isUndefinedOrNull() && !promiseArg.isObject()) {
6792 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute( "voidMethodPromiseArg", "TestObject", "parameter 1 ('promiseArg') is not an obje ct."), info.GetIsolate()); 6792 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodPromiseArg", "TestObject", "parameter 1 ('promiseA rg') is not an object."));
6793 return; 6793 return;
6794 } 6794 }
6795 } 6795 }
6796 impl->voidMethodPromiseArg(promiseArg); 6796 impl->voidMethodPromiseArg(promiseArg);
6797 } 6797 }
6798 6798
6799 static void voidMethodPromiseArgMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info) 6799 static void voidMethodPromiseArgMethodCallback(const v8::FunctionCallbackInfo<v8 ::Value>& info)
6800 { 6800 {
6801 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 6801 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
6802 TestObjectV8Internal::voidMethodPromiseArgMethod(info); 6802 TestObjectV8Internal::voidMethodPromiseArgMethod(info);
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
7146 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(i nfo); 7146 TestObjectV8Internal::voidMethodTestInterfaceEmptyArgOptionalLongArgMethod(i nfo);
7147 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 7147 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
7148 } 7148 }
7149 7149
7150 static void voidMethodOptionalDictionaryArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info) 7150 static void voidMethodOptionalDictionaryArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info)
7151 { 7151 {
7152 TestObject* impl = V8TestObject::toImpl(info.Holder()); 7152 TestObject* impl = V8TestObject::toImpl(info.Holder());
7153 Dictionary optionalDictionaryArg; 7153 Dictionary optionalDictionaryArg;
7154 { 7154 {
7155 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { 7155 if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) {
7156 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute( "voidMethodOptionalDictionaryArg", "TestObject", "parameter 1 ('optionalDictiona ryArg') is not an object."), info.GetIsolate()); 7156 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("voidMethodOptionalDictionaryArg", "TestObject", "parameter 1 ('optionalDictionaryArg') is not an object."));
7157 return; 7157 return;
7158 } 7158 }
7159 optionalDictionaryArg = Dictionary(info[0], info.GetIsolate()); 7159 optionalDictionaryArg = Dictionary(info[0], info.GetIsolate());
7160 } 7160 }
7161 impl->voidMethodOptionalDictionaryArg(optionalDictionaryArg); 7161 impl->voidMethodOptionalDictionaryArg(optionalDictionaryArg);
7162 } 7162 }
7163 7163
7164 static void voidMethodOptionalDictionaryArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info) 7164 static void voidMethodOptionalDictionaryArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info)
7165 { 7165 {
7166 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 7166 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
(...skipping 2574 matching lines...) Expand 10 before | Expand all | Expand 10 after
9741 static void typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMethod(const v8: :FunctionCallbackInfo<v8::Value>& info) 9741 static void typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMethod(const v8: :FunctionCallbackInfo<v8::Value>& info)
9742 { 9742 {
9743 if (UNLIKELY(info.Length() < 1)) { 9743 if (UNLIKELY(info.Length() < 1)) {
9744 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg", "TestOb ject", 1, info.Length()), info.GetIsolate()); 9744 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg", "TestOb ject", 1, info.Length()), info.GetIsolate());
9745 return; 9745 return;
9746 } 9746 }
9747 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9747 TestObject* impl = V8TestObject::toImpl(info.Holder());
9748 TestInterfaceEmpty* testInterfaceEmptyArg; 9748 TestInterfaceEmpty* testInterfaceEmptyArg;
9749 { 9749 {
9750 if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], inf o.GetIsolate())) { 9750 if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], inf o.GetIsolate())) {
9751 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute( "typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg", "TestObject", "parameter 1 is not of type 'TestInterfaceEmpty'."), info.GetIsolate()); 9751 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg", "Test Object", "parameter 1 is not of type 'TestInterfaceEmpty'."));
9752 return; 9752 return;
9753 } 9753 }
9754 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImpl(v8::Handle<v8::Obje ct>::Cast(info[0])); 9754 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImpl(v8::Handle<v8::Obje ct>::Cast(info[0]));
9755 } 9755 }
9756 impl->typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg(testInterfaceEmpt yArg); 9756 impl->typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg(testInterfaceEmpt yArg);
9757 } 9757 }
9758 9758
9759 static void typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMethodCallback(c onst v8::FunctionCallbackInfo<v8::Value>& info) 9759 static void typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMethodCallback(c onst v8::FunctionCallbackInfo<v8::Value>& info)
9760 { 9760 {
9761 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 9761 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
(...skipping 30 matching lines...) Expand all
9792 { 9792 {
9793 if (UNLIKELY(info.Length() < 1)) { 9793 if (UNLIKELY(info.Length() < 1)) {
9794 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg", "TestOb ject", 1, info.Length()), info.GetIsolate()); 9794 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg", "TestOb ject", 1, info.Length()), info.GetIsolate());
9795 return; 9795 return;
9796 } 9796 }
9797 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9797 TestObject* impl = V8TestObject::toImpl(info.Holder());
9798 Node* node1; 9798 Node* node1;
9799 Node* node2; 9799 Node* node2;
9800 { 9800 {
9801 if (info.Length() > 0 && !V8Node::hasInstance(info[0], info.GetIsolate() )) { 9801 if (info.Length() > 0 && !V8Node::hasInstance(info[0], info.GetIsolate() )) {
9802 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute( "useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg", "TestObject", "parameter 1 is not of type 'Node'."), info.GetIsolate()); 9802 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg", "Test Object", "parameter 1 is not of type 'Node'."));
9803 return; 9803 return;
9804 } 9804 }
9805 node1 = V8Node::toImpl(v8::Handle<v8::Object>::Cast(info[0])); 9805 node1 = V8Node::toImpl(v8::Handle<v8::Object>::Cast(info[0]));
9806 if (UNLIKELY(info.Length() <= 1)) { 9806 if (UNLIKELY(info.Length() <= 1)) {
9807 impl->useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg(node1); 9807 impl->useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg(node1);
9808 return; 9808 return;
9809 } 9809 }
9810 if (info.Length() > 1 && !V8Node::hasInstance(info[1], info.GetIsolate() )) { 9810 if (info.Length() > 1 && !V8Node::hasInstance(info[1], info.GetIsolate() )) {
9811 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute( "useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg", "TestObject", "parameter 2 is not of type 'Node'."), info.GetIsolate()); 9811 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg", "Test Object", "parameter 2 is not of type 'Node'."));
9812 return; 9812 return;
9813 } 9813 }
9814 node2 = V8Node::toImpl(v8::Handle<v8::Object>::Cast(info[1])); 9814 node2 = V8Node::toImpl(v8::Handle<v8::Object>::Cast(info[1]));
9815 } 9815 }
9816 impl->useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg(node1, node2); 9816 impl->useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg(node1, node2);
9817 } 9817 }
9818 9818
9819 static void useToImpl4ArgumentsCheckingIfPossibleWithOptionalArgMethodCallback(c onst v8::FunctionCallbackInfo<v8::Value>& info) 9819 static void useToImpl4ArgumentsCheckingIfPossibleWithOptionalArgMethodCallback(c onst v8::FunctionCallbackInfo<v8::Value>& info)
9820 { 9820 {
9821 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 9821 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
9822 TestObjectV8Internal::useToImpl4ArgumentsCheckingIfPossibleWithOptionalArgMe thod(info); 9822 TestObjectV8Internal::useToImpl4ArgumentsCheckingIfPossibleWithOptionalArgMe thod(info);
9823 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 9823 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
9824 } 9824 }
9825 9825
9826 static void useToImpl4ArgumentsCheckingIfPossibleWithNullableArgMethod(const v8: :FunctionCallbackInfo<v8::Value>& info) 9826 static void useToImpl4ArgumentsCheckingIfPossibleWithNullableArgMethod(const v8: :FunctionCallbackInfo<v8::Value>& info)
9827 { 9827 {
9828 if (UNLIKELY(info.Length() < 2)) { 9828 if (UNLIKELY(info.Length() < 2)) {
9829 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "useToImpl4ArgumentsCheckingIfPossibleWithNullableArg", "TestOb ject", 2, info.Length()), info.GetIsolate()); 9829 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "useToImpl4ArgumentsCheckingIfPossibleWithNullableArg", "TestOb ject", 2, info.Length()), info.GetIsolate());
9830 return; 9830 return;
9831 } 9831 }
9832 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9832 TestObject* impl = V8TestObject::toImpl(info.Holder());
9833 Node* node1; 9833 Node* node1;
9834 Node* node2; 9834 Node* node2;
9835 { 9835 {
9836 if (info.Length() > 0 && !V8Node::hasInstance(info[0], info.GetIsolate() )) { 9836 if (info.Length() > 0 && !V8Node::hasInstance(info[0], info.GetIsolate() )) {
9837 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute( "useToImpl4ArgumentsCheckingIfPossibleWithNullableArg", "TestObject", "parameter 1 is not of type 'Node'."), info.GetIsolate()); 9837 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithNullableArg", "Test Object", "parameter 1 is not of type 'Node'."));
9838 return; 9838 return;
9839 } 9839 }
9840 node1 = V8Node::toImpl(v8::Handle<v8::Object>::Cast(info[0])); 9840 node1 = V8Node::toImpl(v8::Handle<v8::Object>::Cast(info[0]));
9841 if (info.Length() > 1 && !isUndefinedOrNull(info[1]) && !V8Node::hasInst ance(info[1], info.GetIsolate())) { 9841 if (info.Length() > 1 && !isUndefinedOrNull(info[1]) && !V8Node::hasInst ance(info[1], info.GetIsolate())) {
9842 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute( "useToImpl4ArgumentsCheckingIfPossibleWithNullableArg", "TestObject", "parameter 2 is not of type 'Node'."), info.GetIsolate()); 9842 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithNullableArg", "Test Object", "parameter 2 is not of type 'Node'."));
9843 return; 9843 return;
9844 } 9844 }
9845 node2 = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[1]); 9845 node2 = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[1]);
9846 } 9846 }
9847 impl->useToImpl4ArgumentsCheckingIfPossibleWithNullableArg(node1, node2); 9847 impl->useToImpl4ArgumentsCheckingIfPossibleWithNullableArg(node1, node2);
9848 } 9848 }
9849 9849
9850 static void useToImpl4ArgumentsCheckingIfPossibleWithNullableArgMethodCallback(c onst v8::FunctionCallbackInfo<v8::Value>& info) 9850 static void useToImpl4ArgumentsCheckingIfPossibleWithNullableArgMethodCallback(c onst v8::FunctionCallbackInfo<v8::Value>& info)
9851 { 9851 {
9852 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 9852 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
9853 TestObjectV8Internal::useToImpl4ArgumentsCheckingIfPossibleWithNullableArgMe thod(info); 9853 TestObjectV8Internal::useToImpl4ArgumentsCheckingIfPossibleWithNullableArgMe thod(info);
9854 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 9854 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
9855 } 9855 }
9856 9856
9857 static void useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArgMethod(const v8 ::FunctionCallbackInfo<v8::Value>& info) 9857 static void useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArgMethod(const v8 ::FunctionCallbackInfo<v8::Value>& info)
9858 { 9858 {
9859 if (UNLIKELY(info.Length() < 1)) { 9859 if (UNLIKELY(info.Length() < 1)) {
9860 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg", "TestO bject", 1, info.Length()), info.GetIsolate()); 9860 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg", "TestO bject", 1, info.Length()), info.GetIsolate());
9861 return; 9861 return;
9862 } 9862 }
9863 TestObject* impl = V8TestObject::toImpl(info.Holder()); 9863 TestObject* impl = V8TestObject::toImpl(info.Holder());
9864 Node* node1; 9864 Node* node1;
9865 Node* node2; 9865 Node* node2;
9866 { 9866 {
9867 if (info.Length() > 0 && !V8Node::hasInstance(info[0], info.GetIsolate() )) { 9867 if (info.Length() > 0 && !V8Node::hasInstance(info[0], info.GetIsolate() )) {
9868 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute( "useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg", "TestObject", "paramete r 1 is not of type 'Node'."), info.GetIsolate()); 9868 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg", "Tes tObject", "parameter 1 is not of type 'Node'."));
9869 return; 9869 return;
9870 } 9870 }
9871 node1 = V8Node::toImpl(v8::Handle<v8::Object>::Cast(info[0])); 9871 node1 = V8Node::toImpl(v8::Handle<v8::Object>::Cast(info[0]));
9872 if (info.Length() > 1 && !V8Node::hasInstance(info[1], info.GetIsolate() )) { 9872 if (info.Length() > 1 && !V8Node::hasInstance(info[1], info.GetIsolate() )) {
9873 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute( "useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg", "TestObject", "paramete r 2 is not of type 'Node'."), info.GetIsolate()); 9873 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg", "Tes tObject", "parameter 2 is not of type 'Node'."));
9874 return; 9874 return;
9875 } 9875 }
9876 node2 = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[1]); 9876 node2 = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[1]);
9877 } 9877 }
9878 impl->useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg(node1, node2); 9878 impl->useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg(node1, node2);
9879 } 9879 }
9880 9880
9881 static void useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArgMethodCallback( const v8::FunctionCallbackInfo<v8::Value>& info) 9881 static void useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArgMethodCallback( const v8::FunctionCallbackInfo<v8::Value>& info)
9882 { 9882 {
9883 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 9883 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
(...skipping 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after
11240 return false; 11240 return false;
11241 11241
11242 ScriptState::Scope scope(scriptState); 11242 ScriptState::Scope scope(scriptState);
11243 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob al(), scriptState->isolate()); 11243 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob al(), scriptState->isolate());
11244 11244
11245 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate Script", "TestObject", scriptState->context()->Global(), scriptState->isolate()) ; 11245 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate Script", "TestObject", scriptState->context()->Global(), scriptState->isolate()) ;
11246 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState-> isolate(), cppValue)); 11246 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState-> isolate(), cppValue));
11247 } 11247 }
11248 11248
11249 } // namespace blink 11249 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/core/V8TestNode.cpp ('k') | Source/bindings/tests/results/core/V8TestTypedefs.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698