Missing allow-none introspection annotation for DomDocument.evaluate method
authorberto@igalia.com <berto@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 14 Sep 2013 19:21:01 +0000 (19:21 +0000)
committerberto@igalia.com <berto@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 14 Sep 2013 19:21:01 +0000 (19:21 +0000)
https://bugs.webkit.org/show_bug.cgi?id=118310

Reviewed by Martin Robinson.

Add (allow-none) introspection annotation to parameters that can
be NULL.

* bindings/scripts/CodeGeneratorGObject.pm:
(GenerateFunction):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@155778 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm

index c31d847..ac55e01 100644 (file)
@@ -1,3 +1,16 @@
+2013-09-14  Alberto Garcia  <berto@igalia.com>
+
+        Missing  allow-none introspection annotation for DomDocument.evaluate method
+        https://bugs.webkit.org/show_bug.cgi?id=118310
+
+        Reviewed by Martin Robinson.
+
+        Add (allow-none) introspection annotation to parameters that can
+        be NULL.
+
+        * bindings/scripts/CodeGeneratorGObject.pm:
+        (GenerateFunction):
+
 2013-09-14  Sam Weinig  <sam@webkit.org>
 
         [CTTE] Node subclasses should take a Document by reference in their constructor (HTMLBodyElement)
index 228f0f3..473ebb3 100644 (file)
@@ -939,7 +939,11 @@ sub GenerateFunction {
         # $paramType can have a trailing * in some cases
         $paramType =~ s/\*$//;
         my $paramName = $param->name;
-        push(@hBody, " * \@${paramName}: A #${paramType}\n");
+        my $paramAnnotations = "";
+        if (ParamCanBeNull($functionName, $paramName)) {
+            $paramAnnotations = " (allow-none):";
+        }
+        push(@hBody, " * \@${paramName}:${paramAnnotations} A #${paramType}\n");
     }
     push(@hBody, " * \@error: #GError\n") if $raisesException;
     push(@hBody, " *\n");