Commit b197c33d authored by eric@webkit.org's avatar eric@webkit.org

2010-02-01 Kavita Kanetkar <kkanetkar@chromium.org>

        Reviewed by Nate Chapin.

        [V8] Making V8 generated classes' GetTemplate() function public
        https://bugs.webkit.org/show_bug.cgi?id=34026

        * bindings/scripts/CodeGeneratorV8.pm: Generated code need not depend on V8CustomBinding.h, made GetTemplate() signature public.

git-svn-id: svn://svn.chromium.org/blink/trunk@54179 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 727d0762
2010-02-01 Kavita Kanetkar <kkanetkar@chromium.org>
Reviewed by Nate Chapin.
[V8] Making V8 generated classes' GetTemplate() function public
https://bugs.webkit.org/show_bug.cgi?id=34026
* bindings/scripts/CodeGeneratorV8.pm: Generated code need not depend on V8CustomBinding.h, made GetTemplate() signature public.
2010-02-01 Steve Block <steveblock@google.com> 2010-02-01 Steve Block <steveblock@google.com>
Reviewed by Ariya Hidayat. Reviewed by Ariya Hidayat.
......
...@@ -962,7 +962,6 @@ END ...@@ -962,7 +962,6 @@ END
push(@implContentDecls, " imp->setAttribute(${namespace}::${contentAttributeName}Attr, $result"); push(@implContentDecls, " imp->setAttribute(${namespace}::${contentAttributeName}Attr, $result");
} elsif ($attribute->signature->type eq "EventListener") { } elsif ($attribute->signature->type eq "EventListener") {
$implIncludes{"V8AbstractEventListener.h"} = 1; $implIncludes{"V8AbstractEventListener.h"} = 1;
$implIncludes{"V8CustomBinding.h"} = 1;
push(@implContentDecls, " transferHiddenDependency(info.Holder(), imp->$attrName(), value, V8${interfaceName}::cacheIndex);\n"); push(@implContentDecls, " transferHiddenDependency(info.Holder(), imp->$attrName(), value, V8${interfaceName}::cacheIndex);\n");
push(@implContentDecls, " imp->set$implSetterFunctionName(V8DOMWrapper::getEventListener(imp, value, true, ListenerFindOrCreate)"); push(@implContentDecls, " imp->set$implSetterFunctionName(V8DOMWrapper::getEventListener(imp, value, true, ListenerFindOrCreate)");
} else { } else {
...@@ -1506,10 +1505,8 @@ sub GenerateImplementation ...@@ -1506,10 +1505,8 @@ sub GenerateImplementation
# Generate special code for the constructor attributes. # Generate special code for the constructor attributes.
if ($attrType =~ /Constructor$/) { if ($attrType =~ /Constructor$/) {
if ($attribute->signature->extendedAttributes->{"CustomGetter"} || if (!($attribute->signature->extendedAttributes->{"CustomGetter"} ||
$attribute->signature->extendedAttributes->{"V8CustomGetter"}) { $attribute->signature->extendedAttributes->{"V8CustomGetter"})) {
$implIncludes{"V8CustomBinding.h"} = 1;
} else {
$hasConstructors = 1; $hasConstructors = 1;
} }
next; next;
...@@ -1524,25 +1521,22 @@ sub GenerateImplementation ...@@ -1524,25 +1521,22 @@ sub GenerateImplementation
# implementation. # implementation.
if ($attribute->signature->extendedAttributes->{"Custom"} || if ($attribute->signature->extendedAttributes->{"Custom"} ||
$attribute->signature->extendedAttributes->{"V8Custom"}) { $attribute->signature->extendedAttributes->{"V8Custom"}) {
$implIncludes{"V8CustomBinding.h"} = 1;
next; next;
} }
# Generate the accessor. # Generate the accessor.
if ($attribute->signature->extendedAttributes->{"CustomGetter"} || if (!($attribute->signature->extendedAttributes->{"CustomGetter"} ||
$attribute->signature->extendedAttributes->{"V8CustomGetter"}) { $attribute->signature->extendedAttributes->{"V8CustomGetter"})) {
$implIncludes{"V8CustomBinding.h"} = 1;
} else {
GenerateNormalAttrGetter($attribute, $dataNode, $classIndex, $implClassName, $interfaceName); GenerateNormalAttrGetter($attribute, $dataNode, $classIndex, $implClassName, $interfaceName);
} }
if ($attribute->signature->extendedAttributes->{"CustomSetter"} || if (!($attribute->signature->extendedAttributes->{"CustomSetter"} ||
$attribute->signature->extendedAttributes->{"V8CustomSetter"}) { $attribute->signature->extendedAttributes->{"V8CustomSetter"})) {
$implIncludes{"V8CustomBinding.h"} = 1; if ($attribute->signature->extendedAttributes->{"Replaceable"}) {
} elsif ($attribute->signature->extendedAttributes->{"Replaceable"}) { $dataNode->extendedAttributes->{"ExtendsDOMGlobalObject"} || die "Replaceable attribute can only be used in interface that defines ExtendsDOMGlobalObject attribute!";
$dataNode->extendedAttributes->{"ExtendsDOMGlobalObject"} || die "Replaceable attribute can only be used in interface that defines ExtendsDOMGlobalObject attribute!"; # GenerateReplaceableAttrSetter($implClassName);
# GenerateReplaceableAttrSetter($implClassName); } elsif ($attribute->type !~ /^readonly/ && !$attribute->signature->extendedAttributes->{"V8ReadOnly"}) {
} elsif ($attribute->type !~ /^readonly/ && !$attribute->signature->extendedAttributes->{"V8ReadOnly"}) { GenerateNormalAttrSetter($attribute, $dataNode, $classIndex, $implClassName, $interfaceName);
GenerateNormalAttrSetter($attribute, $dataNode, $classIndex, $implClassName, $interfaceName); }
} }
} }
...@@ -1556,9 +1550,7 @@ sub GenerateImplementation ...@@ -1556,9 +1550,7 @@ sub GenerateImplementation
foreach my $function (@{$dataNode->functions}) { foreach my $function (@{$dataNode->functions}) {
# hack for addEventListener/RemoveEventListener # hack for addEventListener/RemoveEventListener
# FIXME: avoid naming conflict # FIXME: avoid naming conflict
if ($function->signature->extendedAttributes->{"Custom"} || $function->signature->extendedAttributes->{"V8Custom"}) { if (!($function->signature->extendedAttributes->{"Custom"} || $function->signature->extendedAttributes->{"V8Custom"})) {
$implIncludes{"V8CustomBinding.h"} = 1;
} else {
GenerateFunctionCallback($function, $dataNode, $classIndex, $implClassName); GenerateFunctionCallback($function, $dataNode, $classIndex, $implClassName);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment