Don't add an include for return type of a [Custom] function in generated bindings...
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Oct 2013 00:52:54 +0000 (00:52 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Oct 2013 00:52:54 +0000 (00:52 +0000)
https://bugs.webkit.org/show_bug.cgi?id=122972

Reviewed by Sam Weinig.

* bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): Don't.

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

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

index 6c7a72c..60457e5 100644 (file)
@@ -1,3 +1,12 @@
+2013-10-17  Alexey Proskuryakov  <ap@apple.com>
+
+        Don't add an include for return type of a [Custom] function in generated bindings code
+        https://bugs.webkit.org/show_bug.cgi?id=122972
+
+        Reviewed by Sam Weinig.
+
+        * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): Don't.
+
 2013-10-17  Andreas Kling  <akling@apple.com>
 
         CTTE: RenderMathMLSpace always has a MathMLTextElement.
index 2fa57c0..c197907 100644 (file)
@@ -2330,14 +2330,14 @@ sub GenerateImplementation
     # Functions
     if ($numFunctions > 0) {
         foreach my $function (@{$interface->functions}) {
-            AddIncludesForTypeInImpl($function->signature->type);
-
             my $isCustom = HasCustomMethod($function->signature->extendedAttributes);
             my $isOverloaded = $function->{overloads} && @{$function->{overloads}} > 1;
             my $raisesException = $function->signature->extendedAttributes->{"RaisesException"};
 
             next if $isCustom && $isOverloaded && $function->{overloadIndex} > 1;
 
+            AddIncludesForTypeInImpl($function->signature->type) unless $isCustom;
+
             my $functionName = GetFunctionName($className, $function);
 
             my $conditional = $function->signature->extendedAttributes->{"Conditional"};