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 c6898b1a458f067c0f20d2435d3e959da1ca108b..1eab975a68a54b1de54163f7f3fe07fff03bda39 100644 |
--- a/Source/bindings/tests/results/core/V8TestObject.cpp |
+++ b/Source/bindings/tests/results/core/V8TestObject.cpp |
@@ -6619,7 +6619,7 @@ static void promiseMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
V8RethrowTryCatchScope rethrow(block); |
TONATIVE_VOID_EXCEPTIONSTATE_PROMISE_INTERNAL(arg1, toInt32(info[0], exceptionState), exceptionState, info, ScriptState::current(info.GetIsolate())); |
TONATIVE_VOID_PROMISE_INTERNAL(arg2, Dictionary(info[1], info.GetIsolate()), info); |
- if (!arg2.isUndefinedOrNull() && !arg2.isObject()) { |
+ if (!isUndefinedOrNull(info[1]) && !info[1]->IsObject()) { |
exceptionState.throwTypeError("parameter 2 ('arg2') is not an object."); |
v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.GetIsolate())).v8Value()); |
return; |
@@ -6649,7 +6649,7 @@ static void promiseMethodWithoutExceptionStateMethod(const v8::FunctionCallbackI |
v8::TryCatch block; |
V8RethrowTryCatchScope rethrow(block); |
TONATIVE_VOID_PROMISE_INTERNAL(arg1, Dictionary(info[0], info.GetIsolate()), info); |
- if (!arg1.isUndefinedOrNull() && !arg1.isObject()) { |
+ if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { |
v8SetReturnValue(info, ScriptPromise::rejectRaw(info.GetIsolate(), V8ThrowException::createTypeError(ExceptionMessages::failedToExecute("promiseMethodWithoutExceptionState", "TestObject", "parameter 1 ('arg1') is not an object."), info.GetIsolate()))); |
return; |
} |
@@ -6702,7 +6702,7 @@ static void voidMethodDictionaryArgMethod(const v8::FunctionCallbackInfo<v8::Val |
v8::TryCatch block; |
V8RethrowTryCatchScope rethrow(block); |
TONATIVE_VOID_INTERNAL(dictionaryArg, Dictionary(info[0], info.GetIsolate())); |
- if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) { |
+ if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { |
V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute("voidMethodDictionaryArg", "TestObject", "parameter 1 ('dictionaryArg') is not an object."), info.GetIsolate()); |
return; |
} |
@@ -7188,7 +7188,7 @@ static void voidMethodOptionalDictionaryArgMethod(const v8::FunctionCallbackInfo |
v8::TryCatch block; |
V8RethrowTryCatchScope rethrow(block); |
TONATIVE_VOID_INTERNAL(optionalDictionaryArg, Dictionary(info[0], info.GetIsolate())); |
- if (!optionalDictionaryArg.isUndefinedOrNull() && !optionalDictionaryArg.isObject()) { |
+ if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { |
V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute("voidMethodOptionalDictionaryArg", "TestObject", "parameter 1 ('optionalDictionaryArg') is not an object."), info.GetIsolate()); |
return; |
} |
@@ -8112,6 +8112,11 @@ static void overloadedMethodJ2Method(const v8::FunctionCallbackInfo<v8::Value>& |
{ |
if (!info[0]->IsUndefined()) { |
TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(testDictionaryArg, V8TestDictionary::toImpl(info.GetIsolate(), info[0], exceptionState), exceptionState); |
+ if (!isUndefinedOrNull(info[0]) && !info[0]->IsObject()) { |
+ exceptionState.throwTypeError("parameter 1 ('testDictionaryArg') is not an object."); |
+ exceptionState.throwIfNeeded(); |
+ return; |
+ } |
} else { |
testDictionaryArg = TestDictionary::create(); |
} |