Commit a1ad8b75 authored by haraken@chromium.org's avatar haraken@chromium.org

[Refactoring] Use the [IsWorkerContext] IDL in CodeGeneratorV8.pm

https://bugs.webkit.org/show_bug.cgi?id=77957

Reviewed by Adam Barth.

This patch replaces IsSubType("WorkerContext") and something equivalent that
with the [IsWorkerContext] IDL.

No tests. No change in behavior.

* bindings/scripts/CodeGeneratorV8.pm:
(GetInternalFields):
(GenerateConstructorGetter):
(GenerateImplementation):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106998 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent be4980b5
2012-02-07 Kentaro Hara <haraken@chromium.org>
[Refactoring] Use the [IsWorkerContext] IDL in CodeGeneratorV8.pm
https://bugs.webkit.org/show_bug.cgi?id=77957
Reviewed by Adam Barth.
This patch replaces IsSubType("WorkerContext") and something equivalent that
with the [IsWorkerContext] IDL.
No tests. No change in behavior.
* bindings/scripts/CodeGeneratorV8.pm:
(GetInternalFields):
(GenerateConstructorGetter):
(GenerateImplementation):
2012-02-07 David Reveman <reveman@chromium.org>
[Chromium] Crash when using per-tile painting on Windows.
......@@ -505,17 +505,17 @@ sub GetInternalFields
{
my $dataNode = shift;
my $name = $dataNode->name;
my @customInternalFields = ();
# We can't ask whether a parent type has a given extendedAttribute, so special-case AbstractWorker and WorkerContext to include all sub-types.
# We can't ask whether a parent type has a given extendedAttribute,
# so special-case AbstractWorker and WorkerContext to include all sub-types.
# Event listeners on DOM nodes are explicitly supported in the GC controller.
# FIXME: SVGElementInstance should probably have the EventTarget extended attribute, but doesn't.
if (!IsNodeSubType($dataNode) &&
($dataNode->extendedAttributes->{"EventTarget"} ||
IsSubType($dataNode, "AbstractWorker") ||
IsSubType($dataNode, "WorkerContext") ||
$name eq "SVGElementInstance")) {
if (!IsNodeSubType($dataNode)
&& ($dataNode->extendedAttributes->{"EventTarget"}
|| $dataNode->extendedAttributes->{"IsWorkerContext"}
|| IsSubType($dataNode, "AbstractWorker")
|| $name eq "SVGElementInstance")) {
push(@customInternalFields, "eventListenerCacheIndex");
}
......@@ -735,6 +735,7 @@ END
sub GenerateConstructorGetter
{
my $dataNode = shift;
my $implClassName = shift;
push(@implContentDecls, <<END);
......@@ -753,7 +754,7 @@ END
// context of the DOMWindow and not in the context of the caller.
return V8DOMWrapper::getConstructor(type, V8DOMWindow::toNative(info.Holder()));
END
} elsif ($implClassName eq "DedicatedWorkerContext" or $implClassName eq "WorkerContext" or $implClassName eq "SharedWorkerContext") {
} elsif ($dataNode->extendedAttributes->{"IsWorkerContext"}) {
push(@implContentDecls, <<END);
return V8DOMWrapper::getConstructor(type, V8WorkerContext::toNative(info.Holder()));
END
......@@ -2310,7 +2311,7 @@ sub GenerateImplementation
}
if ($hasConstructors) {
GenerateConstructorGetter($implClassName);
GenerateConstructorGetter($dataNode, $implClassName);
}
my $indexer;
......
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