| Index: Source/bindings/scripts/code_generator_v8.pm
|
| diff --git a/Source/bindings/scripts/code_generator_v8.pm b/Source/bindings/scripts/code_generator_v8.pm
|
| index 1207addbfb84546e62149957d31408972b2356ce..d2af7f5a4f493989f0bad4ce2716a547c312131c 100644
|
| --- a/Source/bindings/scripts/code_generator_v8.pm
|
| +++ b/Source/bindings/scripts/code_generator_v8.pm
|
| @@ -2792,8 +2792,8 @@ END
|
| my $argValue = "info[$paramIndex]";
|
| my $argType = $parameter->type;
|
| if (IsWrapperType($argType)) {
|
| - my $undefinedNullCheck = $parameter->isNullable ? "isUndefinedOrNull($argValue)" : "${argValue}->IsUndefined()";
|
| - $parameterCheckString .= " if (info.Length() > $paramIndex && !$undefinedNullCheck && !V8${argType}::hasInstance($argValue, info.GetIsolate())) {\n";
|
| + my $undefinedNullCheck = $parameter->isNullable ? "!isUndefinedOrNull($argValue) &&" : "isUndefinedOrNull($argValue) ||";
|
| + $parameterCheckString .= " if (info.Length() > $paramIndex && ($undefinedNullCheck !V8${argType}::hasInstance($argValue, info.GetIsolate()))) {\n";
|
| if ($hasExceptionState) {
|
| $parameterCheckString .= " exceptionState.throwTypeError(\"parameter $humanFriendlyIndex is not of type \'$argType\'.\");\n";
|
| $parameterCheckString .= " exceptionState.throwIfNeeded();\n";
|
|
|