Changeset 106998 in webkit


Ignore:
Timestamp:
Feb 7, 2012 3:38:19 PM (12 years ago)
Author:
haraken@chromium.org
Message:

[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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r106997 r106998  
     12012-02-07  Kentaro Hara  <haraken@chromium.org>
     2
     3        [Refactoring] Use the [IsWorkerContext] IDL in CodeGeneratorV8.pm
     4        https://bugs.webkit.org/show_bug.cgi?id=77957
     5
     6        Reviewed by Adam Barth.
     7
     8        This patch replaces IsSubType("WorkerContext") and something equivalent that
     9        with the [IsWorkerContext] IDL.
     10
     11        No tests. No change in behavior.
     12
     13        * bindings/scripts/CodeGeneratorV8.pm:
     14        (GetInternalFields):
     15        (GenerateConstructorGetter):
     16        (GenerateImplementation):
     17
    1182012-02-07  David Reveman  <reveman@chromium.org>
    219
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm

    r106892 r106998  
    506506    my $dataNode = shift;
    507507    my $name = $dataNode->name;
    508    
     508
    509509    my @customInternalFields = ();
    510  
    511     # We can't ask whether a parent type has a given extendedAttribute, so special-case AbstractWorker and WorkerContext to include all sub-types.
     510    # We can't ask whether a parent type has a given extendedAttribute,
     511    # so special-case AbstractWorker and WorkerContext to include all sub-types.
    512512    # Event listeners on DOM nodes are explicitly supported in the GC controller.
    513513    # FIXME: SVGElementInstance should probably have the EventTarget extended attribute, but doesn't.
    514     if (!IsNodeSubType($dataNode) &&
    515         ($dataNode->extendedAttributes->{"EventTarget"} ||
    516          IsSubType($dataNode, "AbstractWorker") ||
    517          IsSubType($dataNode, "WorkerContext") ||
    518          $name eq "SVGElementInstance")) {
     514    if (!IsNodeSubType($dataNode)
     515        && ($dataNode->extendedAttributes->{"EventTarget"}
     516            || $dataNode->extendedAttributes->{"IsWorkerContext"}
     517            || IsSubType($dataNode, "AbstractWorker")
     518            || $name eq "SVGElementInstance")) {
    519519        push(@customInternalFields, "eventListenerCacheIndex");
    520520    }
     
    736736sub GenerateConstructorGetter
    737737{
     738    my $dataNode = shift;
    738739    my $implClassName = shift;
    739740
     
    754755    return V8DOMWrapper::getConstructor(type, V8DOMWindow::toNative(info.Holder()));
    755756END
    756     } elsif ($implClassName eq "DedicatedWorkerContext" or $implClassName eq "WorkerContext" or $implClassName eq "SharedWorkerContext") {
     757    } elsif ($dataNode->extendedAttributes->{"IsWorkerContext"}) {
    757758        push(@implContentDecls, <<END);
    758759    return V8DOMWrapper::getConstructor(type, V8WorkerContext::toNative(info.Holder()));
     
    23112312
    23122313    if ($hasConstructors) {
    2313         GenerateConstructorGetter($implClassName);
     2314        GenerateConstructorGetter($dataNode, $implClassName);
    23142315    }
    23152316
Note: See TracChangeset for help on using the changeset viewer.