[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 15:13:53 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit e66baf296312dde84125cc7c377dda5b4184eadf
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Oct 29 06:32:52 2010 +0000
2010-10-28 Sergio Villar Senin <svillar at igalia.com>
Reviewed by Xan Lopez.
[GTK] GObject bindings generator issues
https://bugs.webkit.org/show_bug.cgi?id=48135
GObject code generator must not generate conditional API's. This
patch also adds an alternative return value for non-void
conditional methods. With this change the conditionalMethods hack
is no longer needed.
* bindings/scripts/CodeGeneratorGObject.pm:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70844 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index db2a9ca..41bf255 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-10-28 Sergio Villar Senin <svillar at igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] GObject bindings generator issues
+ https://bugs.webkit.org/show_bug.cgi?id=48135
+
+ GObject code generator must not generate conditional API's. This
+ patch also adds an alternative return value for non-void
+ conditional methods. With this change the conditionalMethods hack
+ is no longer needed.
+
+ * bindings/scripts/CodeGeneratorGObject.pm:
+
2010-10-28 David Hyatt <hyatt at apple.com>
Reviewed by Dan Bernstein.
diff --git a/WebCore/bindings/scripts/CodeGeneratorGObject.pm b/WebCore/bindings/scripts/CodeGeneratorGObject.pm
index 6a1d115..dd9e3c7 100644
--- a/WebCore/bindings/scripts/CodeGeneratorGObject.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorGObject.pm
@@ -796,11 +796,6 @@ sub addIncludeInBody {
}
}
-# Some methods' body (only the body, since the public API can't be
-# conditional) should be guarded by #ifdefs depending on whether
-# certain features in WebKit are enabled.
-my %conditionalMethods = ("webkit_dom_geolocation_clear_watch" => "GEOLOCATION");
-
sub GenerateFunction {
my ($object, $interfaceName, $function, $prefix) = @_;
@@ -879,18 +874,11 @@ sub GenerateFunction {
$functionSig .= ", GError **error";
}
- push(@hBody, "#if ${conditionalString}\n") if $conditionalString;
push(@hBody, "WEBKIT_API $returnType\n$functionName($functionSig);\n");
- push(@hBody, "#endif /* ${conditionalString} */\n") if $conditionalString;
push(@hBody, "\n");
- push(@cBody, "#if ${conditionalString}\n") if $conditionalString;
push(@cBody, "$returnType\n$functionName($functionSig)\n{\n");
- push(@cBody, " WebCore::JSMainThreadNullState state;\n");
-
- if ($conditionalMethods{$functionName}) {
- push(@cBody, "#if ENABLE($conditionalMethods{$functionName})\n");
- }
+ push(@cBody, "#if ${conditionalString}\n") if $conditionalString;
if ($returnType ne "void") {
# TODO: return proper default result
@@ -899,6 +887,8 @@ sub GenerateFunction {
push(@cBody, " g_return_if_fail(self);\n");
}
+ push(@cBody, " WebCore::JSMainThreadNullState state;\n");
+
# The WebKit::core implementations check for NULL already; no need to
# duplicate effort.
push(@cBody, " WebCore::${interfaceName} * item = WebKit::core(self);\n");
@@ -1050,13 +1040,19 @@ EOF
}
}
- if ($conditionalMethods{$functionName}) {
- push(@cBody, "#endif\n");
+ if ($conditionalString) {
+ if ($returnType ne "void") {
+ push(@cBody, "#else\n");
+ if ($codeGenerator->IsNonPointerType($functionSigType)) {
+ push(@cBody, " return static_cast<${returnType}>(0);\n");
+ } else {
+ push(@cBody, " return NULL;\n");
+ }
+ }
+ push(@cBody, "#endif /* ${conditionalString} */\n") if $conditionalString;
}
- push(@cBody, "}\n");
- push(@cBody, "#endif /* ${conditionalString} */\n") if $conditionalString;
- push(@cBody, "\n");
+ push(@cBody, "}\n\n");
}
sub ClassHasFunction {
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list