| 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 d0e432ec7f81e3f741c9e4cbb065247bbfd9e98a..7049e34906461e34372730a4c937392cefe485b7 100644
|
| --- a/Source/bindings/scripts/code_generator_v8.pm
|
| +++ b/Source/bindings/scripts/code_generator_v8.pm
|
| @@ -2778,7 +2778,8 @@ END
|
| my $argValue = "info[$paramIndex]";
|
| my $argType = $parameter->type;
|
| if (IsWrapperType($argType)) {
|
| - $parameterCheckString .= " if (info.Length() > $paramIndex && !isUndefinedOrNull($argValue) && !V8${argType}::hasInstance($argValue, info.GetIsolate(), worldType(info.GetIsolate()))) {\n";
|
| + my $undefinedNullCheck = $parameter->isNullable ? "isUndefinedOrNull($argValue)" : "${argValue}->IsUndefined()";
|
| + $parameterCheckString .= " if (info.Length() > $paramIndex && !$undefinedNullCheck && !V8${argType}::hasInstance($argValue, info.GetIsolate(), worldType(info.GetIsolate()))) {\n";
|
| if ($hasExceptionState) {
|
| $parameterCheckString .= " exceptionState.throwTypeError(\"parameter $humanFriendlyIndex is not of type \'$argType\'.\");\n";
|
| $parameterCheckString .= " exceptionState.throwIfNeeded();\n";
|
|
|