Title: [267865] trunk
Revision
267865
Author
wei...@apple.com
Date
2020-10-01 18:42:14 -0700 (Thu, 01 Oct 2020)

Log Message

[WebIDL] Add support for non-nullable optional wrapper type arguments to operations
https://bugs.webkit.org/show_bug.cgi?id=217162

Reviewed by Chris Dumez.
Source/WebCore:

The bindings currently treat both nullable and optional wrapper types as
having type WrapperType* (or RefPtr<WrapperType> for callbacks), whereas
non-nullable, non-optional wrapper types are treated as having type WrapperType&
(or Ref<WrapperType> for callbacks). This parallels non wrapper types
which use Optional<Type> for both nullable and optional vs Type for the
non-nullable non-optional variant. In both these cases, there is possibility
for ambiguity, should we ever need to disambiguate between nullable and
optional, but thus far it hasn't come up.

This change adds a missing case where we weren't supporting non-nullable
optional wrapper type arguments to operations. We solve this by expecting
the wrapped implementation to take the optional wrapper type argument the
same way it would take an optional wrapper type argument, with a WrapperType*,
(or RefPtr<WrapperType> for callbacks) that gets passed a nullptr if the
parameter was ommited.

Adopt this in Geolocation.idl, which has had a FIXME for this for a long
time.

* Modules/geolocation/Geolocation.idl:
* bindings/scripts/CodeGeneratorJS.pm:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/TestObj.idl:

LayoutTests:

* fast/dom/Geolocation/argument-types.html:
* fast/dom/Geolocation/argument-types-expected.txt:
Update tests now that the second argument to Geolocation.getCurrentPosition
and Geolocation.watchPosition are non-nullable.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (267864 => 267865)


--- trunk/LayoutTests/ChangeLog	2020-10-02 01:16:04 UTC (rev 267864)
+++ trunk/LayoutTests/ChangeLog	2020-10-02 01:42:14 UTC (rev 267865)
@@ -1,3 +1,15 @@
+2020-10-01  Sam Weinig  <wei...@apple.com>
+
+        [WebIDL] Add support for non-nullable optional wrapper type arguments to operations
+        https://bugs.webkit.org/show_bug.cgi?id=217162
+
+        Reviewed by Chris Dumez.
+
+        * fast/dom/Geolocation/argument-types.html:
+        * fast/dom/Geolocation/argument-types-expected.txt:
+        Update tests now that the second argument to Geolocation.getCurrentPosition
+        and Geolocation.watchPosition are non-nullable.
+
 2020-10-01  Myles C. Maxfield  <mmaxfi...@apple.com>
 
         [GPU Process] Support drawing text in 2D canvas with font features

Modified: trunk/LayoutTests/fast/dom/Geolocation/argument-types-expected.txt (267864 => 267865)


--- trunk/LayoutTests/fast/dom/Geolocation/argument-types-expected.txt	2020-10-02 01:16:04 UTC (rev 267864)
+++ trunk/LayoutTests/fast/dom/Geolocation/argument-types-expected.txt	2020-10-02 01:42:14 UTC (rev 267865)
@@ -17,7 +17,7 @@
 PASS navigator.geolocation.getCurrentPosition(-Infinity) threw exception TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function.
 PASS navigator.geolocation.getCurrentPosition("string") threw exception TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function.
 PASS navigator.geolocation.getCurrentPosition(emptyFunction, undefined) did not throw exception.
-PASS navigator.geolocation.getCurrentPosition(emptyFunction, null) did not throw exception.
+PASS navigator.geolocation.getCurrentPosition(emptyFunction, null) threw exception TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function.
 PASS navigator.geolocation.getCurrentPosition(emptyFunction, {}) threw exception TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function.
 PASS navigator.geolocation.getCurrentPosition(emptyFunction, objectThrowingException) threw exception TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function.
 PASS navigator.geolocation.getCurrentPosition(emptyFunction, emptyFunction) did not throw exception.

Modified: trunk/LayoutTests/fast/dom/Geolocation/argument-types.html (267864 => 267865)


--- trunk/LayoutTests/fast/dom/Geolocation/argument-types.html	2020-10-02 01:16:04 UTC (rev 267864)
+++ trunk/LayoutTests/fast/dom/Geolocation/argument-types.html	2020-10-02 01:42:14 UTC (rev 267865)
@@ -56,7 +56,7 @@
 test('navigator.geolocation.getCurrentPosition("string")', true, "TypeError: Argument 1 ('successCallback') to Geolocation.getCurrentPosition must be a function");
 
 test('navigator.geolocation.getCurrentPosition(emptyFunction, undefined)', false);
-test('navigator.geolocation.getCurrentPosition(emptyFunction, null)', false);
+test('navigator.geolocation.getCurrentPosition(emptyFunction, null)', true, "TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function");
 test('navigator.geolocation.getCurrentPosition(emptyFunction, {})', true, "TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function");
 test('navigator.geolocation.getCurrentPosition(emptyFunction, objectThrowingException)', true, "TypeError: Argument 2 ('errorCallback') to Geolocation.getCurrentPosition must be a function");
 test('navigator.geolocation.getCurrentPosition(emptyFunction, emptyFunction)', false);

Modified: trunk/Source/WebCore/ChangeLog (267864 => 267865)


--- trunk/Source/WebCore/ChangeLog	2020-10-02 01:16:04 UTC (rev 267864)
+++ trunk/Source/WebCore/ChangeLog	2020-10-02 01:42:14 UTC (rev 267865)
@@ -1,3 +1,34 @@
+2020-10-01  Sam Weinig  <wei...@apple.com>
+
+        [WebIDL] Add support for non-nullable optional wrapper type arguments to operations
+        https://bugs.webkit.org/show_bug.cgi?id=217162
+
+        Reviewed by Chris Dumez.
+        
+        The bindings currently treat both nullable and optional wrapper types as
+        having type WrapperType* (or RefPtr<WrapperType> for callbacks), whereas 
+        non-nullable, non-optional wrapper types are treated as having type WrapperType&
+        (or Ref<WrapperType> for callbacks). This parallels non wrapper types
+        which use Optional<Type> for both nullable and optional vs Type for the
+        non-nullable non-optional variant. In both these cases, there is possibility
+        for ambiguity, should we ever need to disambiguate between nullable and 
+        optional, but thus far it hasn't come up.
+        
+        This change adds a missing case where we weren't supporting non-nullable 
+        optional wrapper type arguments to operations. We solve this by expecting
+        the wrapped implementation to take the optional wrapper type argument the
+        same way it would take an optional wrapper type argument, with a WrapperType*,
+        (or RefPtr<WrapperType> for callbacks) that gets passed a nullptr if the
+        parameter was ommited.
+
+        Adopt this in Geolocation.idl, which has had a FIXME for this for a long
+        time.
+
+        * Modules/geolocation/Geolocation.idl:
+        * bindings/scripts/CodeGeneratorJS.pm:
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        * bindings/scripts/test/TestObj.idl:
+
 2020-10-01  Myles C. Maxfield  <mmaxfi...@apple.com>
 
         [GPU Process] Support drawing text in 2D canvas with font features

Modified: trunk/Source/WebCore/Modules/geolocation/Geolocation.idl (267864 => 267865)


--- trunk/Source/WebCore/Modules/geolocation/Geolocation.idl	2020-10-02 01:16:04 UTC (rev 267864)
+++ trunk/Source/WebCore/Modules/geolocation/Geolocation.idl	2020-10-02 01:42:14 UTC (rev 267865)
@@ -30,14 +30,12 @@
     GenerateIsReachable=ReachableFromNavigator,
     Exposed=Window
 ] interface Geolocation {
-    // FIXME: PositionErrorCallback should not be nullable
     undefined getCurrentPosition(PositionCallback successCallback,
-                            optional PositionErrorCallback? errorCallback,
+                            optional PositionErrorCallback errorCallback,
                             optional PositionOptions options);
 
-    // FIXME: PositionErrorCallback should not be nullable
     long watchPosition(PositionCallback successCallback,
-                       optional PositionErrorCallback? errorCallback,
+                       optional PositionErrorCallback errorCallback,
                        optional PositionOptions options);
 
     undefined clearWatch(long watchId);

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (267864 => 267865)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2020-10-02 01:16:04 UTC (rev 267864)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2020-10-02 01:42:14 UTC (rev 267865)
@@ -1824,8 +1824,21 @@
         return "${name}.releaseNonNull()";
     }
 
-    return "${name}.releaseNonNull()" if $codeGenerator->IsCallbackInterface($type) || $codeGenerator->IsCallbackFunction($type) || ($codeGenerator->IsPromiseType($type) && (ref($context) ne "IDLArgument" || !$context->isOptional));
-    return "*${name}" if $codeGenerator->IsWrapperType($type);
+    if ($codeGenerator->IsPromiseType($type)) {
+        return "WTFMove(${name})" if ref($context) eq "IDLArgument" && $context->isOptional;
+        return "${name}.releaseNonNull()";
+    }
+
+    if ($codeGenerator->IsCallbackInterface($type) || $codeGenerator->IsCallbackFunction($type)) {
+        return "WTFMove(${name})" if ref($context) eq "IDLArgument" && $context->isOptional;
+        return "${name}.releaseNonNull()";
+    }
+
+    if ($codeGenerator->IsWrapperType($type)) {
+        return "${name}" if ref($context) eq "IDLArgument" && $context->isOptional;
+        return "*${name}";
+    }
+
     return "WTFMove(${name})";
 }
 
@@ -6191,8 +6204,6 @@
     foreach my $argument (@{$operation->arguments}) {
         my $type = $argument->type;
 
-        assert "Optional arguments of non-nullable wrapper types are not supported (" . $operation->name . ")" if $argument->isOptional && !$type->isNullable && $codeGenerator->IsWrapperType($type);
-
         if ($argument->isOptional && !defined($argument->default)) {
             # As per Web IDL, optional dictionary arguments are always considered to have a default value of an empty dictionary, unless otherwise specified.
             $argument->default("[]") if $codeGenerator->IsDictionaryType($type);
@@ -6209,9 +6220,6 @@
             # As per Web IDL, passing undefined for a nullable argument is treated as null. Therefore, use null as
             # default value for nullable arguments unless otherwise specified.
             $argument->default("null") if $type->isNullable;
-
-            # For callback arguments, the generated bindings treat undefined as null, so use null as implicit default value.
-            $argument->default("null") if $codeGenerator->IsCallbackInterface($type) || $codeGenerator->IsCallbackFunction($type);
         }
 
         my $name = $argument->name;
@@ -6246,7 +6254,9 @@
                     my $argumentIDLType = GetIDLType($interface, $argument->type);
 
                     my $defaultValue;
-                    if ($codeGenerator->IsPromiseType($argument->type)) {
+                    if ($codeGenerator->IsCallbackInterface($type) || $codeGenerator->IsCallbackFunction($type)) {
+                        $defaultValue = "Converter<$argumentIDLType>::ReturnType()";
+                    } elsif ($codeGenerator->IsPromiseType($argument->type) || $codeGenerator->IsWrapperType($type)) {
                         $defaultValue = "nullptr";
                     } else {
                         $defaultValue = "Optional<Converter<$argumentIDLType>::ReturnType>()";

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (267864 => 267865)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp	2020-10-02 01:16:04 UTC (rev 267864)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp	2020-10-02 01:42:14 UTC (rev 267865)
@@ -1510,17 +1510,22 @@
 JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithOptionalBooleanIsFalse);
 JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithOptionalAny);
 JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithOptionalObject);
+JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithOptionalWrapper);
 JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapper);
 JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperIsNull);
 JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithOptionalXPathNSResolver);
 JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithOptionalRecord);
 JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithOptionalPromise);
-JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithCallbackArg);
-JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg);
-JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg);
+JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithCallbackInterfaceArg);
+JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithNullableCallbackInterfaceArg);
+JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithNonCallbackInterfaceArgAndCallbackInterfaceArg);
+JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithOptionalCallbackInterfaceArg);
+JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithOptionalNullableCallbackInterfaceArg);
 JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithCallbackFunctionArg);
+JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithNullableCallbackFunctionArg);
 JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArg);
-JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArg);
+JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithOptionalCallbackFunctionArg);
+JSC_DECLARE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithOptionalNullableCallbackFunctionArg);
 JSC_DECLARE_HOST_FUNCTION(jsTestObjConstructorFunctionStaticMethodWithCallbackAndOptionalArg);
 JSC_DECLARE_HOST_FUNCTION(jsTestObjConstructorFunctionStaticMethodWithCallbackArg);
 #if ENABLE(Condition1)
@@ -2220,17 +2225,22 @@
     { "methodWithOptionalBooleanIsFalse", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalBooleanIsFalse), (intptr_t) (0) } },
     { "methodWithOptionalAny", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalAny), (intptr_t) (0) } },
     { "methodWithOptionalObject", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalObject), (intptr_t) (0) } },
+    { "methodWithOptionalWrapper", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalWrapper), (intptr_t) (0) } },
     { "methodWithOptionalNullableWrapper", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapper), (intptr_t) (0) } },
     { "methodWithOptionalNullableWrapperIsNull", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperIsNull), (intptr_t) (0) } },
     { "methodWithOptionalXPathNSResolver", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalXPathNSResolver), (intptr_t) (0) } },
     { "methodWithOptionalRecord", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalRecord), (intptr_t) (0) } },
     { "methodWithOptionalPromise", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalPromise), (intptr_t) (0) } },
-    { "methodWithCallbackArg", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithCallbackArg), (intptr_t) (1) } },
-    { "methodWithNonCallbackArgAndCallbackArg", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg), (intptr_t) (2) } },
-    { "methodWithCallbackAndOptionalArg", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg), (intptr_t) (0) } },
+    { "methodWithCallbackInterfaceArg", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithCallbackInterfaceArg), (intptr_t) (1) } },
+    { "methodWithNullableCallbackInterfaceArg", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithNullableCallbackInterfaceArg), (intptr_t) (1) } },
+    { "methodWithNonCallbackInterfaceArgAndCallbackInterfaceArg", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithNonCallbackInterfaceArgAndCallbackInterfaceArg), (intptr_t) (2) } },
+    { "methodWithOptionalCallbackInterfaceArg", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalCallbackInterfaceArg), (intptr_t) (0) } },
+    { "methodWithOptionalNullableCallbackInterfaceArg", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalNullableCallbackInterfaceArg), (intptr_t) (0) } },
     { "methodWithCallbackFunctionArg", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithCallbackFunctionArg), (intptr_t) (1) } },
+    { "methodWithNullableCallbackFunctionArg", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithNullableCallbackFunctionArg), (intptr_t) (1) } },
     { "methodWithNonCallbackArgAndCallbackFunctionArg", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArg), (intptr_t) (2) } },
-    { "methodWithCallbackFunctionAndOptionalArg", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArg), (intptr_t) (0) } },
+    { "methodWithOptionalCallbackFunctionArg", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalCallbackFunctionArg), (intptr_t) (0) } },
+    { "methodWithOptionalNullableCallbackFunctionArg", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalNullableCallbackFunctionArg), (intptr_t) (0) } },
 #if ENABLE(Condition1)
     { "conditionalMethod1", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsTestObjPrototypeFunctionConditionalMethod1), (intptr_t) (0) } },
 #else
@@ -7026,6 +7036,26 @@
     return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunctionMethodWithOptionalObjectBody>(*lexicalGlobalObject, *callFrame, "methodWithOptionalObject");
 }
 
+static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalWrapperBody(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame, typename IDLOperation<JSTestObj>::ClassParameter castedThis)
+{
+    auto& vm = JSC::getVM(lexicalGlobalObject);
+    auto throwScope = DECLARE_THROW_SCOPE(vm);
+    UNUSED_PARAM(throwScope);
+    UNUSED_PARAM(callFrame);
+    auto& impl = castedThis->wrapped();
+    EnsureStillAliveScope argument0 = callFrame->argument(0);
+    auto obj = argument0.value().isUndefined() ? nullptr : convert<IDLInterface<TestObj>>(*lexicalGlobalObject, argument0.value(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentTypeError(lexicalGlobalObject, scope, 0, "obj", "TestObject", "methodWithOptionalWrapper", "TestObj"); });
+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
+    throwScope.release();
+    impl.methodWithOptionalWrapper(obj);
+    return JSValue::encode(jsUndefined());
+}
+
+JSC_DEFINE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithOptionalWrapper, (JSGlobalObject* lexicalGlobalObject, CallFrame* callFrame))
+{
+    return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunctionMethodWithOptionalWrapperBody>(*lexicalGlobalObject, *callFrame, "methodWithOptionalWrapper");
+}
+
 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperBody(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame, typename IDLOperation<JSTestObj>::ClassParameter castedThis)
 {
     auto& vm = JSC::getVM(lexicalGlobalObject);
@@ -7126,7 +7156,7 @@
     return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunctionMethodWithOptionalPromiseBody>(*lexicalGlobalObject, *callFrame, "methodWithOptionalPromise");
 }
 
-static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithCallbackArgBody(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame, typename IDLOperation<JSTestObj>::ClassParameter castedThis)
+static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithCallbackInterfaceArgBody(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame, typename IDLOperation<JSTestObj>::ClassParameter castedThis)
 {
     auto& vm = JSC::getVM(lexicalGlobalObject);
     auto throwScope = DECLARE_THROW_SCOPE(vm);
@@ -7136,19 +7166,19 @@
     if (UNLIKELY(callFrame->argumentCount() < 1))
         return throwVMError(lexicalGlobalObject, throwScope, createNotEnoughArgumentsError(lexicalGlobalObject));
     EnsureStillAliveScope argument0 = callFrame->uncheckedArgument(0);
-    auto callback = convert<IDLCallbackInterface<JSTestCallbackInterface>>(*lexicalGlobalObject, argument0.value(), *castedThis->globalObject(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentMustBeObjectError(lexicalGlobalObject, scope, 0, "callback", "TestObject", "methodWithCallbackArg"); });
+    auto callback = convert<IDLCallbackInterface<JSTestCallbackInterface>>(*lexicalGlobalObject, argument0.value(), *castedThis->globalObject(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentMustBeObjectError(lexicalGlobalObject, scope, 0, "callback", "TestObject", "methodWithCallbackInterfaceArg"); });
     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
     throwScope.release();
-    impl.methodWithCallbackArg(callback.releaseNonNull());
+    impl.methodWithCallbackInterfaceArg(callback.releaseNonNull());
     return JSValue::encode(jsUndefined());
 }
 
-JSC_DEFINE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithCallbackArg, (JSGlobalObject* lexicalGlobalObject, CallFrame* callFrame))
+JSC_DEFINE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithCallbackInterfaceArg, (JSGlobalObject* lexicalGlobalObject, CallFrame* callFrame))
 {
-    return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunctionMethodWithCallbackArgBody>(*lexicalGlobalObject, *callFrame, "methodWithCallbackArg");
+    return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunctionMethodWithCallbackInterfaceArgBody>(*lexicalGlobalObject, *callFrame, "methodWithCallbackInterfaceArg");
 }
 
-static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArgBody(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame, typename IDLOperation<JSTestObj>::ClassParameter castedThis)
+static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithNullableCallbackInterfaceArgBody(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame, typename IDLOperation<JSTestObj>::ClassParameter castedThis)
 {
     auto& vm = JSC::getVM(lexicalGlobalObject);
     auto throwScope = DECLARE_THROW_SCOPE(vm);
@@ -7155,6 +7185,28 @@
     UNUSED_PARAM(throwScope);
     UNUSED_PARAM(callFrame);
     auto& impl = castedThis->wrapped();
+    if (UNLIKELY(callFrame->argumentCount() < 1))
+        return throwVMError(lexicalGlobalObject, throwScope, createNotEnoughArgumentsError(lexicalGlobalObject));
+    EnsureStillAliveScope argument0 = callFrame->uncheckedArgument(0);
+    auto callback = convert<IDLNullable<IDLCallbackInterface<JSTestCallbackInterface>>>(*lexicalGlobalObject, argument0.value(), *castedThis->globalObject(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentMustBeObjectError(lexicalGlobalObject, scope, 0, "callback", "TestObject", "methodWithNullableCallbackInterfaceArg"); });
+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
+    throwScope.release();
+    impl.methodWithNullableCallbackInterfaceArg(WTFMove(callback));
+    return JSValue::encode(jsUndefined());
+}
+
+JSC_DEFINE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithNullableCallbackInterfaceArg, (JSGlobalObject* lexicalGlobalObject, CallFrame* callFrame))
+{
+    return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunctionMethodWithNullableCallbackInterfaceArgBody>(*lexicalGlobalObject, *callFrame, "methodWithNullableCallbackInterfaceArg");
+}
+
+static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithNonCallbackInterfaceArgAndCallbackInterfaceArgBody(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame, typename IDLOperation<JSTestObj>::ClassParameter castedThis)
+{
+    auto& vm = JSC::getVM(lexicalGlobalObject);
+    auto throwScope = DECLARE_THROW_SCOPE(vm);
+    UNUSED_PARAM(throwScope);
+    UNUSED_PARAM(callFrame);
+    auto& impl = castedThis->wrapped();
     if (UNLIKELY(callFrame->argumentCount() < 2))
         return throwVMError(lexicalGlobalObject, throwScope, createNotEnoughArgumentsError(lexicalGlobalObject));
     EnsureStillAliveScope argument0 = callFrame->uncheckedArgument(0);
@@ -7161,19 +7213,19 @@
     auto nonCallback = convert<IDLLong>(*lexicalGlobalObject, argument0.value());
     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
     EnsureStillAliveScope argument1 = callFrame->uncheckedArgument(1);
-    auto callback = convert<IDLCallbackInterface<JSTestCallbackInterface>>(*lexicalGlobalObject, argument1.value(), *castedThis->globalObject(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentMustBeObjectError(lexicalGlobalObject, scope, 1, "callback", "TestObject", "methodWithNonCallbackArgAndCallbackArg"); });
+    auto callback = convert<IDLCallbackInterface<JSTestCallbackInterface>>(*lexicalGlobalObject, argument1.value(), *castedThis->globalObject(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentMustBeObjectError(lexicalGlobalObject, scope, 1, "callback", "TestObject", "methodWithNonCallbackInterfaceArgAndCallbackInterfaceArg"); });
     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
     throwScope.release();
-    impl.methodWithNonCallbackArgAndCallbackArg(WTFMove(nonCallback), callback.releaseNonNull());
+    impl.methodWithNonCallbackInterfaceArgAndCallbackInterfaceArg(WTFMove(nonCallback), callback.releaseNonNull());
     return JSValue::encode(jsUndefined());
 }
 
-JSC_DEFINE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg, (JSGlobalObject* lexicalGlobalObject, CallFrame* callFrame))
+JSC_DEFINE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithNonCallbackInterfaceArgAndCallbackInterfaceArg, (JSGlobalObject* lexicalGlobalObject, CallFrame* callFrame))
 {
-    return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArgBody>(*lexicalGlobalObject, *callFrame, "methodWithNonCallbackArgAndCallbackArg");
+    return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunctionMethodWithNonCallbackInterfaceArgAndCallbackInterfaceArgBody>(*lexicalGlobalObject, *callFrame, "methodWithNonCallbackInterfaceArgAndCallbackInterfaceArg");
 }
 
-static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArgBody(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame, typename IDLOperation<JSTestObj>::ClassParameter castedThis)
+static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalCallbackInterfaceArgBody(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame, typename IDLOperation<JSTestObj>::ClassParameter castedThis)
 {
     auto& vm = JSC::getVM(lexicalGlobalObject);
     auto throwScope = DECLARE_THROW_SCOPE(vm);
@@ -7181,18 +7233,38 @@
     UNUSED_PARAM(callFrame);
     auto& impl = castedThis->wrapped();
     EnsureStillAliveScope argument0 = callFrame->argument(0);
-    auto callback = convert<IDLNullable<IDLCallbackInterface<JSTestCallbackInterface>>>(*lexicalGlobalObject, argument0.value(), *castedThis->globalObject(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentMustBeObjectError(lexicalGlobalObject, scope, 0, "callback", "TestObject", "methodWithCallbackAndOptionalArg"); });
+    auto callback = argument0.value().isUndefined() ? Converter<IDLCallbackInterface<JSTestCallbackInterface>>::ReturnType() : convert<IDLCallbackInterface<JSTestCallbackInterface>>(*lexicalGlobalObject, argument0.value(), *castedThis->globalObject(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentMustBeObjectError(lexicalGlobalObject, scope, 0, "callback", "TestObject", "methodWithOptionalCallbackInterfaceArg"); });
     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
     throwScope.release();
-    impl.methodWithCallbackAndOptionalArg(WTFMove(callback));
+    impl.methodWithOptionalCallbackInterfaceArg(WTFMove(callback));
     return JSValue::encode(jsUndefined());
 }
 
-JSC_DEFINE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg, (JSGlobalObject* lexicalGlobalObject, CallFrame* callFrame))
+JSC_DEFINE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithOptionalCallbackInterfaceArg, (JSGlobalObject* lexicalGlobalObject, CallFrame* callFrame))
 {
-    return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArgBody>(*lexicalGlobalObject, *callFrame, "methodWithCallbackAndOptionalArg");
+    return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunctionMethodWithOptionalCallbackInterfaceArgBody>(*lexicalGlobalObject, *callFrame, "methodWithOptionalCallbackInterfaceArg");
 }
 
+static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalNullableCallbackInterfaceArgBody(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame, typename IDLOperation<JSTestObj>::ClassParameter castedThis)
+{
+    auto& vm = JSC::getVM(lexicalGlobalObject);
+    auto throwScope = DECLARE_THROW_SCOPE(vm);
+    UNUSED_PARAM(throwScope);
+    UNUSED_PARAM(callFrame);
+    auto& impl = castedThis->wrapped();
+    EnsureStillAliveScope argument0 = callFrame->argument(0);
+    auto callback = convert<IDLNullable<IDLCallbackInterface<JSTestCallbackInterface>>>(*lexicalGlobalObject, argument0.value(), *castedThis->globalObject(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentMustBeObjectError(lexicalGlobalObject, scope, 0, "callback", "TestObject", "methodWithOptionalNullableCallbackInterfaceArg"); });
+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
+    throwScope.release();
+    impl.methodWithOptionalNullableCallbackInterfaceArg(WTFMove(callback));
+    return JSValue::encode(jsUndefined());
+}
+
+JSC_DEFINE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithOptionalNullableCallbackInterfaceArg, (JSGlobalObject* lexicalGlobalObject, CallFrame* callFrame))
+{
+    return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunctionMethodWithOptionalNullableCallbackInterfaceArgBody>(*lexicalGlobalObject, *callFrame, "methodWithOptionalNullableCallbackInterfaceArg");
+}
+
 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithCallbackFunctionArgBody(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame, typename IDLOperation<JSTestObj>::ClassParameter castedThis)
 {
     auto& vm = JSC::getVM(lexicalGlobalObject);
@@ -7215,6 +7287,28 @@
     return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunctionMethodWithCallbackFunctionArgBody>(*lexicalGlobalObject, *callFrame, "methodWithCallbackFunctionArg");
 }
 
+static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithNullableCallbackFunctionArgBody(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame, typename IDLOperation<JSTestObj>::ClassParameter castedThis)
+{
+    auto& vm = JSC::getVM(lexicalGlobalObject);
+    auto throwScope = DECLARE_THROW_SCOPE(vm);
+    UNUSED_PARAM(throwScope);
+    UNUSED_PARAM(callFrame);
+    auto& impl = castedThis->wrapped();
+    if (UNLIKELY(callFrame->argumentCount() < 1))
+        return throwVMError(lexicalGlobalObject, throwScope, createNotEnoughArgumentsError(lexicalGlobalObject));
+    EnsureStillAliveScope argument0 = callFrame->uncheckedArgument(0);
+    auto callback = convert<IDLNullable<IDLCallbackFunction<JSTestCallbackFunction>>>(*lexicalGlobalObject, argument0.value(), *castedThis->globalObject(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentMustBeFunctionError(lexicalGlobalObject, scope, 0, "callback", "TestObject", "methodWithNullableCallbackFunctionArg"); });
+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
+    throwScope.release();
+    impl.methodWithNullableCallbackFunctionArg(WTFMove(callback));
+    return JSValue::encode(jsUndefined());
+}
+
+JSC_DEFINE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithNullableCallbackFunctionArg, (JSGlobalObject* lexicalGlobalObject, CallFrame* callFrame))
+{
+    return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunctionMethodWithNullableCallbackFunctionArgBody>(*lexicalGlobalObject, *callFrame, "methodWithNullableCallbackFunctionArg");
+}
+
 static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArgBody(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame, typename IDLOperation<JSTestObj>::ClassParameter castedThis)
 {
     auto& vm = JSC::getVM(lexicalGlobalObject);
@@ -7240,7 +7334,7 @@
     return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackFunctionArgBody>(*lexicalGlobalObject, *callFrame, "methodWithNonCallbackArgAndCallbackFunctionArg");
 }
 
-static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArgBody(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame, typename IDLOperation<JSTestObj>::ClassParameter castedThis)
+static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalCallbackFunctionArgBody(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame, typename IDLOperation<JSTestObj>::ClassParameter castedThis)
 {
     auto& vm = JSC::getVM(lexicalGlobalObject);
     auto throwScope = DECLARE_THROW_SCOPE(vm);
@@ -7248,18 +7342,38 @@
     UNUSED_PARAM(callFrame);
     auto& impl = castedThis->wrapped();
     EnsureStillAliveScope argument0 = callFrame->argument(0);
-    auto callback = convert<IDLNullable<IDLCallbackFunction<JSTestCallbackFunction>>>(*lexicalGlobalObject, argument0.value(), *castedThis->globalObject(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentMustBeFunctionError(lexicalGlobalObject, scope, 0, "callback", "TestObject", "methodWithCallbackFunctionAndOptionalArg"); });
+    auto callback = argument0.value().isUndefined() ? Converter<IDLCallbackFunction<JSTestCallbackFunction>>::ReturnType() : convert<IDLCallbackFunction<JSTestCallbackFunction>>(*lexicalGlobalObject, argument0.value(), *castedThis->globalObject(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentMustBeFunctionError(lexicalGlobalObject, scope, 0, "callback", "TestObject", "methodWithOptionalCallbackFunctionArg"); });
     RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
     throwScope.release();
-    impl.methodWithCallbackFunctionAndOptionalArg(WTFMove(callback));
+    impl.methodWithOptionalCallbackFunctionArg(WTFMove(callback));
     return JSValue::encode(jsUndefined());
 }
 
-JSC_DEFINE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArg, (JSGlobalObject* lexicalGlobalObject, CallFrame* callFrame))
+JSC_DEFINE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithOptionalCallbackFunctionArg, (JSGlobalObject* lexicalGlobalObject, CallFrame* callFrame))
 {
-    return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunctionMethodWithCallbackFunctionAndOptionalArgBody>(*lexicalGlobalObject, *callFrame, "methodWithCallbackFunctionAndOptionalArg");
+    return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunctionMethodWithOptionalCallbackFunctionArgBody>(*lexicalGlobalObject, *callFrame, "methodWithOptionalCallbackFunctionArg");
 }
 
+static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithOptionalNullableCallbackFunctionArgBody(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame, typename IDLOperation<JSTestObj>::ClassParameter castedThis)
+{
+    auto& vm = JSC::getVM(lexicalGlobalObject);
+    auto throwScope = DECLARE_THROW_SCOPE(vm);
+    UNUSED_PARAM(throwScope);
+    UNUSED_PARAM(callFrame);
+    auto& impl = castedThis->wrapped();
+    EnsureStillAliveScope argument0 = callFrame->argument(0);
+    auto callback = convert<IDLNullable<IDLCallbackFunction<JSTestCallbackFunction>>>(*lexicalGlobalObject, argument0.value(), *castedThis->globalObject(), [](JSC::JSGlobalObject& lexicalGlobalObject, JSC::ThrowScope& scope) { throwArgumentMustBeFunctionError(lexicalGlobalObject, scope, 0, "callback", "TestObject", "methodWithOptionalNullableCallbackFunctionArg"); });
+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
+    throwScope.release();
+    impl.methodWithOptionalNullableCallbackFunctionArg(WTFMove(callback));
+    return JSValue::encode(jsUndefined());
+}
+
+JSC_DEFINE_HOST_FUNCTION(jsTestObjPrototypeFunctionMethodWithOptionalNullableCallbackFunctionArg, (JSGlobalObject* lexicalGlobalObject, CallFrame* callFrame))
+{
+    return IDLOperation<JSTestObj>::call<jsTestObjPrototypeFunctionMethodWithOptionalNullableCallbackFunctionArgBody>(*lexicalGlobalObject, *callFrame, "methodWithOptionalNullableCallbackFunctionArg");
+}
+
 static inline JSC::EncodedJSValue jsTestObjConstructorFunctionStaticMethodWithCallbackAndOptionalArgBody(JSC::JSGlobalObject* lexicalGlobalObject, JSC::CallFrame* callFrame)
 {
     auto& vm = JSC::getVM(lexicalGlobalObject);

Modified: trunk/Source/WebCore/bindings/scripts/test/TestObj.idl (267864 => 267865)


--- trunk/Source/WebCore/bindings/scripts/test/TestObj.idl	2020-10-02 01:16:04 UTC (rev 267864)
+++ trunk/Source/WebCore/bindings/scripts/test/TestObj.idl	2020-10-02 01:42:14 UTC (rev 267865)
@@ -241,6 +241,7 @@
     undefined    methodWithOptionalBooleanIsFalse(optional boolean b = false);
     undefined    methodWithOptionalAny(optional any a);
     undefined    methodWithOptionalObject(optional object a);
+    undefined    methodWithOptionalWrapper(optional TestObj obj);
     undefined    methodWithOptionalNullableWrapper(optional TestObj? obj);
     undefined    methodWithOptionalNullableWrapperIsNull(optional TestObj? obj = null);
     undefined    methodWithOptionalXPathNSResolver(optional XPathNSResolver? resolver);
@@ -248,14 +249,18 @@
     undefined    methodWithOptionalPromise(optional Promise<undefined> promise);
 
     // Callback interface parameters.
-    undefined    methodWithCallbackArg(TestCallbackInterface callback);
-    undefined    methodWithNonCallbackArgAndCallbackArg(long nonCallback, TestCallbackInterface callback);
-    undefined    methodWithCallbackAndOptionalArg(optional TestCallbackInterface? callback);
+    undefined    methodWithCallbackInterfaceArg(TestCallbackInterface callback);
+    undefined    methodWithNullableCallbackInterfaceArg(TestCallbackInterface? callback);
+    undefined    methodWithNonCallbackInterfaceArgAndCallbackInterfaceArg(long nonCallback, TestCallbackInterface callback);
+    undefined    methodWithOptionalCallbackInterfaceArg(optional TestCallbackInterface callback);
+    undefined    methodWithOptionalNullableCallbackInterfaceArg(optional TestCallbackInterface? callback);
 
     // Callback function parameters.
     undefined    methodWithCallbackFunctionArg(TestCallbackFunction callback);
+    undefined    methodWithNullableCallbackFunctionArg(TestCallbackFunction? callback);
     undefined    methodWithNonCallbackArgAndCallbackFunctionArg(long nonCallback, TestCallbackFunction callback);
-    undefined    methodWithCallbackFunctionAndOptionalArg(optional TestCallbackFunction? callback);
+    undefined    methodWithOptionalCallbackFunctionArg(optional TestCallbackFunction callback);
+    undefined    methodWithOptionalNullableCallbackFunctionArg(optional TestCallbackFunction? callback);
 
     // static methods with 'Callback' extended attribute
     static undefined    staticMethodWithCallbackAndOptionalArg(optional TestCallbackInterface? callback);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to