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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: Source/bindings/tests/results/core/V8TestObject.cpp
diff --git a/Source/bindings/tests/results/core/V8TestObject.cpp b/Source/bindings/tests/results/core/V8TestObject.cpp
index 34eaacf0b65eb9b772775b7c9d36cd5e58c3ba96..758e306a35ea258e6ab3f246543d3caa944c6d75 100644
--- a/Source/bindings/tests/results/core/V8TestObject.cpp
+++ b/Source/bindings/tests/results/core/V8TestObject.cpp
@@ -6502,7 +6502,7 @@ static void voidMethodTestCallbackInterfaceArgMethod(const v8::FunctionCallbackI
TestCallbackInterface* testCallbackInterfaceArg;
{
if (info.Length() <= 0 || !info[0]->IsFunction()) {
- V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestCallbackInterfaceArg", "TestObject", "The callback provided as parameter 1 is not a function."), info.GetIsolate());
+ V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodTestCallbackInterfaceArg", "TestObject", "The callback provided as parameter 1 is not a function."));
return;
}
testCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate()));
@@ -6524,7 +6524,7 @@ static void voidMethodOptionalTestCallbackInterfaceArgMethod(const v8::FunctionC
{
if (!isUndefinedOrNull(info[0])) {
if (!info[0]->IsFunction()) {
- V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute("voidMethodOptionalTestCallbackInterfaceArg", "TestObject", "The callback provided as parameter 1 is not a function."), info.GetIsolate());
+ V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodOptionalTestCallbackInterfaceArg", "TestObject", "The callback provided as parameter 1 is not a function."));
return;
}
optionalTestCallbackInterfaceArg = V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate()));
@@ -6552,7 +6552,7 @@ static void voidMethodTestCallbackInterfaceOrNullArgMethod(const v8::FunctionCal
TestCallbackInterface* testCallbackInterfaceArg;
{
if (info.Length() <= 0 || !(info[0]->IsFunction() || info[0]->IsNull())) {
- V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestCallbackInterfaceOrNullArg", "TestObject", "The callback provided as parameter 1 is not a function."), info.GetIsolate());
+ V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodTestCallbackInterfaceOrNullArg", "TestObject", "The callback provided as parameter 1 is not a function."));
return;
}
testCallbackInterfaceArg = info[0]->IsNull() ? nullptr : V8TestCallbackInterface::create(v8::Handle<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate()));
@@ -6592,7 +6592,7 @@ static void voidMethodTestEnumArgMethod(const v8::FunctionCallbackInfo<v8::Value
TOSTRING_VOID_INTERNAL(testEnumTypeArg, info[0]);
String string = testEnumTypeArg;
if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || string == "EnumValue3")) {
- V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestEnumArg", "TestObject", "parameter 1 ('" + string + "') is not a valid enum value."), info.GetIsolate());
+ V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodTestEnumArg", "TestObject", "parameter 1 ('" + string + "') is not a valid enum value."));
return;
}
}
@@ -6742,7 +6742,7 @@ static void voidMethodDictionaryArgMethod(const v8::FunctionCallbackInfo<v8::Val
Dictionary dictionaryArg;
{
if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) {
- V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute("voidMethodDictionaryArg", "TestObject", "parameter 1 ('dictionaryArg') is not an object."), info.GetIsolate());
+ V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodDictionaryArg", "TestObject", "parameter 1 ('dictionaryArg') is not an object."));
return;
}
dictionaryArg = Dictionary(info[0], info.GetIsolate());
@@ -6789,7 +6789,7 @@ static void voidMethodPromiseArgMethod(const v8::FunctionCallbackInfo<v8::Value>
{
promiseArg = ScriptPromise::cast(ScriptState::current(info.GetIsolate()), info[0]);
if (!promiseArg.isUndefinedOrNull() && !promiseArg.isObject()) {
- V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute("voidMethodPromiseArg", "TestObject", "parameter 1 ('promiseArg') is not an object."), info.GetIsolate());
+ V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodPromiseArg", "TestObject", "parameter 1 ('promiseArg') is not an object."));
return;
}
}
@@ -7153,7 +7153,7 @@ static void voidMethodOptionalDictionaryArgMethod(const v8::FunctionCallbackInfo
Dictionary optionalDictionaryArg;
{
if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) {
- V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute("voidMethodOptionalDictionaryArg", "TestObject", "parameter 1 ('optionalDictionaryArg') is not an object."), info.GetIsolate());
+ V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodOptionalDictionaryArg", "TestObject", "parameter 1 ('optionalDictionaryArg') is not an object."));
return;
}
optionalDictionaryArg = Dictionary(info[0], info.GetIsolate());
@@ -9748,7 +9748,7 @@ static void typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMethod(const v8:
TestInterfaceEmpty* testInterfaceEmptyArg;
{
if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())) {
- V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute("typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg", "TestObject", "parameter 1 is not of type 'TestInterfaceEmpty'."), info.GetIsolate());
+ V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg", "TestObject", "parameter 1 is not of type 'TestInterfaceEmpty'."));
return;
}
testInterfaceEmptyArg = V8TestInterfaceEmpty::toImpl(v8::Handle<v8::Object>::Cast(info[0]));
@@ -9799,7 +9799,7 @@ static void useToImpl4ArgumentsCheckingIfPossibleWithOptionalArgMethod(const v8:
Node* node2;
{
if (info.Length() > 0 && !V8Node::hasInstance(info[0], info.GetIsolate())) {
- V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg", "TestObject", "parameter 1 is not of type 'Node'."), info.GetIsolate());
+ V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg", "TestObject", "parameter 1 is not of type 'Node'."));
return;
}
node1 = V8Node::toImpl(v8::Handle<v8::Object>::Cast(info[0]));
@@ -9808,7 +9808,7 @@ static void useToImpl4ArgumentsCheckingIfPossibleWithOptionalArgMethod(const v8:
return;
}
if (info.Length() > 1 && !V8Node::hasInstance(info[1], info.GetIsolate())) {
- V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg", "TestObject", "parameter 2 is not of type 'Node'."), info.GetIsolate());
+ V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg", "TestObject", "parameter 2 is not of type 'Node'."));
return;
}
node2 = V8Node::toImpl(v8::Handle<v8::Object>::Cast(info[1]));
@@ -9834,12 +9834,12 @@ static void useToImpl4ArgumentsCheckingIfPossibleWithNullableArgMethod(const v8:
Node* node2;
{
if (info.Length() > 0 && !V8Node::hasInstance(info[0], info.GetIsolate())) {
- V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithNullableArg", "TestObject", "parameter 1 is not of type 'Node'."), info.GetIsolate());
+ V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithNullableArg", "TestObject", "parameter 1 is not of type 'Node'."));
return;
}
node1 = V8Node::toImpl(v8::Handle<v8::Object>::Cast(info[0]));
if (info.Length() > 1 && !isUndefinedOrNull(info[1]) && !V8Node::hasInstance(info[1], info.GetIsolate())) {
- V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithNullableArg", "TestObject", "parameter 2 is not of type 'Node'."), info.GetIsolate());
+ V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithNullableArg", "TestObject", "parameter 2 is not of type 'Node'."));
return;
}
node2 = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[1]);
@@ -9865,12 +9865,12 @@ static void useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArgMethod(const v8
Node* node2;
{
if (info.Length() > 0 && !V8Node::hasInstance(info[0], info.GetIsolate())) {
- V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg", "TestObject", "parameter 1 is not of type 'Node'."), info.GetIsolate());
+ V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg", "TestObject", "parameter 1 is not of type 'Node'."));
return;
}
node1 = V8Node::toImpl(v8::Handle<v8::Object>::Cast(info[0]));
if (info.Length() > 1 && !V8Node::hasInstance(info[1], info.GetIsolate())) {
- V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg", "TestObject", "parameter 2 is not of type 'Node'."), info.GetIsolate());
+ V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg", "TestObject", "parameter 2 is not of type 'Node'."));
return;
}
node2 = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[1]);
« 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