summaryrefslogtreecommitdiffstats
path: root/webkit/port
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-05 18:42:30 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-05 18:42:30 +0000
commit110187521175f10a8bcf522aa763a6fdb286cdc6 (patch)
treee7cddf79aee066546c899087fa8c1d8d7f22e4d9 /webkit/port
parentefd3f9e1abc7eb615492cb9ee4c1e9b13fbb25cb (diff)
downloadchromium_src-110187521175f10a8bcf522aa763a6fdb286cdc6.zip
chromium_src-110187521175f10a8bcf522aa763a6fdb286cdc6.tar.gz
chromium_src-110187521175f10a8bcf522aa763a6fdb286cdc6.tar.bz2
Add support for the V8Custom attribute in advance of merging in
http://trac.webkit.org/changeset/40617 This change allows us to remove some of the #ifdefs in Document.idl R=levin Review URL: http://codereview.chromium.org/21075 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9229 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port')
-rw-r--r--webkit/port/bindings/scripts/CodeGeneratorV8.pm23
1 files changed, 16 insertions, 7 deletions
diff --git a/webkit/port/bindings/scripts/CodeGeneratorV8.pm b/webkit/port/bindings/scripts/CodeGeneratorV8.pm
index ab6be33..f9000a2 100644
--- a/webkit/port/bindings/scripts/CodeGeneratorV8.pm
+++ b/webkit/port/bindings/scripts/CodeGeneratorV8.pm
@@ -741,8 +741,14 @@ sub GenerateNewFunctionTemplate
my $interfaceName = $dataNode->name;
my $name = $function->signature->name;
- if ($function->signature->extendedAttributes->{"Custom"}) {
- my $customFunc = $function->signature->extendedAttributes->{"Custom"};
+ if ($function->signature->extendedAttributes->{"Custom"} ||
+ $function->signature->extendedAttributes->{"V8Custom"}) {
+ if ($function->signature->extendedAttributes->{"Custom"} &&
+ $function->signature->extendedAttributes->{"V8Custom"}) {
+ die "Custom and V8Custom should be mutually exclusive!"
+ }
+ my $customFunc = $function->signature->extendedAttributes->{"Custom"} ||
+ $function->signature->extendedAttributes->{"V8Custom"};
if ($customFunc eq 1) {
$customFunc = $interfaceName . WK_ucfirst($name);
}
@@ -882,7 +888,7 @@ sub GenerateBatchedAttributeData
$accessControl = "static_cast<v8::AccessControl>(" . $accessControl . ")";
- my $customAccessor = $attrExt->{"Custom"} || $attrExt->{"CustomSetter"} || $attrExt->{"CustomGetter"} || "";
+ my $customAccessor = $attrExt->{"Custom"} || $attrExt->{"V8Custom"} || $attrExt->{"CustomSetter"} || $attrExt->{"CustomGetter"} || "";
if ($customAccessor eq 1) {
# use the naming convension, interface + (capitalize) attr name
$customAccessor = $interfaceName . WK_ucfirst($attrName);
@@ -924,7 +930,7 @@ sub GenerateBatchedAttributeData
}
# Custom Getter and Setter
- } elsif ($attrExt->{"Custom"}) {
+ } elsif ($attrExt->{"Custom"} || $attrExt->{"V8Custom"}) {
$getter = "V8Custom::v8${customAccessor}AccessorGetter";
$setter = "V8Custom::v8${customAccessor}AccessorSetter";
@@ -1050,7 +1056,8 @@ sub GenerateImplementation
# Do not generate accessor if this is a custom attribute. The
# call will be forwarded to a hand-written accessor
# implementation.
- if ($attribute->signature->extendedAttributes->{"Custom"}) {
+ if ($attribute->signature->extendedAttributes->{"Custom"} ||
+ $attribute->signature->extendedAttributes->{"V8Custom"}) {
$implIncludes{"v8_custom.h"} = 1;
next;
}
@@ -1079,7 +1086,8 @@ sub GenerateImplementation
foreach my $function (@{$dataNode->functions}) {
# hack for addEventListener/RemoveEventListener
# TODO(fqian): avoid naming conflict
- if ($function->signature->extendedAttributes->{"Custom"}) {
+ if ($function->signature->extendedAttributes->{"Custom"} ||
+ $function->signature->extendedAttributes->{"V8Custom"}) {
$implIncludes{"v8_custom.h"} = 1;
} else {
@@ -1829,7 +1837,8 @@ sub RequiresCustomSignature
{
my $function = shift;
# No signature needed for Custom function
- if ($function->signature->extendedAttributes->{"Custom"}) {
+ if ($function->signature->extendedAttributes->{"Custom"} ||
+ $function->signature->extendedAttributes->{"V8Custom"}) {
return 0;
}