Changeset 60223 in webkit


Ignore:
Timestamp:
May 26, 2010 2:18:33 AM (14 years ago)
Author:
xan@webkit.org
Message:

2010-05-26 Xan Lopez <xlopez@igalia.com>

Reviewed by Gustavo Noronha.

[GTK] GObject DOM bindings
https://bugs.webkit.org/show_bug.cgi?id=33590

We need to protect the body of some methods with #ifdefs, since
the availability of the code they call into is decided at compile
time.

  • bindings/scripts/CodeGeneratorGObject.pm:
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r60222 r60223  
     12010-05-26  Xan Lopez  <xlopez@igalia.com>
     2
     3        Reviewed by Gustavo Noronha.
     4
     5        [GTK] GObject DOM bindings
     6        https://bugs.webkit.org/show_bug.cgi?id=33590
     7
     8        We need to protect the body of some methods with #ifdefs, since
     9        the availability of the code they call into is decided at compile
     10        time.
     11
     12        * bindings/scripts/CodeGeneratorGObject.pm:
     13
    1142010-05-26  Kent Tamura  <tkent@chromium.org>
    215
  • trunk/WebCore/bindings/scripts/CodeGeneratorGObject.pm

    r58871 r60223  
    675675}
    676676
     677# Some methods' body (only the body, since the public API can't be
     678# conditional) should be guarded by #ifdefs depending on whether
     679# certain features in WebKit are enabled.
     680my %conditionalMethods = ("webkit_dom_geolocation_clear_watch" => "GEOLOCATION");
     681
    677682sub GenerateFunction {
    678683    my ($object, $interfaceName, $function, $prefix) = @_;
     
    742747    push(@hBody, "WEBKIT_API $returnType\n$functionName ($functionSig);\n\n");
    743748    push(@cBody, "$returnType\n$functionName ($functionSig)\n{\n");
     749
     750    if ($conditionalMethods{$functionName}) {
     751        push(@cBody, "#if ENABLE($conditionalMethods{$functionName})\n");
     752    }
    744753
    745754    if ($returnType ne "void") {
     
    901910        }
    902911    }
     912
     913    if ($conditionalMethods{$functionName}) {
     914        push(@cBody, "#endif\n");
     915    }
     916
    903917    push(@cBody, "\n}\n\n");
    904918}
Note: See TracChangeset for help on using the changeset viewer.