Skip to content
Permalink
Browse files
[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):


Canonical link: https://commits.webkit.org/94914@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@106998 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
xharaken committed Feb 7, 2012
1 parent 1c47ecd commit 9833a7d3e385a9b2685c9b4759b448dc6469f6d0
Showing 2 changed files with 28 additions and 10 deletions.
@@ -1,3 +1,20 @@
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;

0 comments on commit 9833a7d

Please sign in to comment.