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>
Reviewed by Ariya Hidayat.
......
......@@ -962,7 +962,6 @@ END
push(@implContentDecls, " imp->setAttribute(${namespace}::${contentAttributeName}Attr, $result");
} elsif ($attribute->signature->type eq "EventListener") {
$implIncludes{"V8AbstractEventListener.h"} = 1;
$implIncludes{"V8CustomBinding.h"} = 1;
push(@implContentDecls, " transferHiddenDependency(info.Holder(), imp->$attrName(), value, V8${interfaceName}::cacheIndex);\n");
push(@implContentDecls, " imp->set$implSetterFunctionName(V8DOMWrapper::getEventListener(imp, value, true, ListenerFindOrCreate)");
} else {
......@@ -1506,10 +1505,8 @@ sub GenerateImplementation
# Generate special code for the constructor attributes.
if ($attrType =~ /Constructor$/) {
if ($attribute->signature->extendedAttributes->{"CustomGetter"} ||
$attribute->signature->extendedAttributes->{"V8CustomGetter"}) {
$implIncludes{"V8CustomBinding.h"} = 1;
} else {
if (!($attribute->signature->extendedAttributes->{"CustomGetter"} ||
$attribute->signature->extendedAttributes->{"V8CustomGetter"})) {
$hasConstructors = 1;
}
next;
......@@ -1524,27 +1521,24 @@ sub GenerateImplementation
# implementation.
if ($attribute->signature->extendedAttributes->{"Custom"} ||
$attribute->signature->extendedAttributes->{"V8Custom"}) {
$implIncludes{"V8CustomBinding.h"} = 1;
next;
}
# Generate the accessor.
if ($attribute->signature->extendedAttributes->{"CustomGetter"} ||
$attribute->signature->extendedAttributes->{"V8CustomGetter"}) {
$implIncludes{"V8CustomBinding.h"} = 1;
} else {
if (!($attribute->signature->extendedAttributes->{"CustomGetter"} ||
$attribute->signature->extendedAttributes->{"V8CustomGetter"})) {
GenerateNormalAttrGetter($attribute, $dataNode, $classIndex, $implClassName, $interfaceName);
}
if ($attribute->signature->extendedAttributes->{"CustomSetter"} ||
$attribute->signature->extendedAttributes->{"V8CustomSetter"}) {
$implIncludes{"V8CustomBinding.h"} = 1;
} elsif ($attribute->signature->extendedAttributes->{"Replaceable"}) {
if (!($attribute->signature->extendedAttributes->{"CustomSetter"} ||
$attribute->signature->extendedAttributes->{"V8CustomSetter"})) {
if ($attribute->signature->extendedAttributes->{"Replaceable"}) {
$dataNode->extendedAttributes->{"ExtendsDOMGlobalObject"} || die "Replaceable attribute can only be used in interface that defines ExtendsDOMGlobalObject attribute!";
# GenerateReplaceableAttrSetter($implClassName);
} elsif ($attribute->type !~ /^readonly/ && !$attribute->signature->extendedAttributes->{"V8ReadOnly"}) {
GenerateNormalAttrSetter($attribute, $dataNode, $classIndex, $implClassName, $interfaceName);
}
}
}
if ($hasConstructors) {
GenerateConstructorGetter($implClassName, $classIndex);
......@@ -1556,9 +1550,7 @@ sub GenerateImplementation
foreach my $function (@{$dataNode->functions}) {
# hack for addEventListener/RemoveEventListener
# FIXME: avoid naming conflict
if ($function->signature->extendedAttributes->{"Custom"} || $function->signature->extendedAttributes->{"V8Custom"}) {
$implIncludes{"V8CustomBinding.h"} = 1;
} else {
if (!($function->signature->extendedAttributes->{"Custom"} || $function->signature->extendedAttributes->{"V8Custom"})) {
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