Changeset 123439 in webkit


Ignore:
Timestamp:
Jul 24, 2012 1:44:58 AM (12 years ago)
Author:
haraken@chromium.org
Message:

[JSC] REGRESSION(r122912): CodeGeneratorJS.pm generates wrong code
for static attributes in supplemental IDL files
https://bugs.webkit.org/show_bug.cgi?id=91925

Reviewed by Adam Barth.

r122912 implemented static attributes in CodeGeneratorJS.pm.
However, it generates wrong code for static attributes in supplemental
IDL files. This patch fixes it as shown in JSTestInterface.cpp.
This fix aligns with the fix in CodeGeneratorV8.pm (r123308).

Test: bindings/scripts/test/TestSupplemental.idl

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):

  • bindings/scripts/test/JS/JSTestInterface.cpp:

(WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
(WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
(WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r123438 r123439  
     12012-07-24  Kentaro Hara  <haraken@chromium.org>
     2
     3        [JSC] REGRESSION(r122912): CodeGeneratorJS.pm generates wrong code
     4        for static attributes in supplemental IDL files
     5        https://bugs.webkit.org/show_bug.cgi?id=91925
     6
     7        Reviewed by Adam Barth.
     8
     9        r122912 implemented static attributes in CodeGeneratorJS.pm.
     10        However, it generates wrong code for static attributes in supplemental
     11        IDL files. This patch fixes it as shown in JSTestInterface.cpp.
     12        This fix aligns with the fix in CodeGeneratorV8.pm (r123308).
     13
     14        Test: bindings/scripts/test/TestSupplemental.idl
     15
     16        * bindings/scripts/CodeGeneratorJS.pm:
     17        (GenerateImplementation):
     18        * bindings/scripts/test/JS/JSTestInterface.cpp:
     19        (WebCore::jsTestInterfaceConstructorSupplementalStaticReadOnlyAttr):
     20        (WebCore::jsTestInterfaceConstructorSupplementalStaticAttr):
     21        (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
     22
    1232012-07-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
    224
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r123433 r123439  
    18431843                            $implIncludes{"${implementedBy}.h"} = 1;
    18441844                            $functionName = "${implementedBy}::${functionName}";
    1845                             unshift(@arguments, "impl");
     1845                            unshift(@arguments, "impl") if !$attribute->isStatic;
    18461846                        } elsif ($attribute->isStatic) {
    18471847                            $functionName = "${implClassName}::${functionName}";
     
    20722072                                        my $implementedBy = $attribute->signature->extendedAttributes->{"ImplementedBy"};
    20732073                                        $implIncludes{"${implementedBy}.h"} = 1;
    2074                                         unshift(@arguments, "impl");
     2074                                        unshift(@arguments, "impl") if !$attribute->isStatic;
    20752075                                        $functionName = "${implementedBy}::${functionName}";
    20762076                                    } elsif ($attribute->isStatic) {
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp

    r123433 r123439  
    246246{
    247247    UNUSED_PARAM(exec);
    248     JSValue result = jsNumber(TestSupplemental::supplementalStaticReadOnlyAttr(impl));
     248    JSValue result = jsNumber(TestSupplemental::supplementalStaticReadOnlyAttr());
    249249    return result;
    250250}
     
    256256{
    257257    UNUSED_PARAM(exec);
    258     JSValue result = jsString(exec, TestSupplemental::supplementalStaticAttr(impl));
     258    JSValue result = jsString(exec, TestSupplemental::supplementalStaticAttr());
    259259    return result;
    260260}
     
    326326{
    327327    UNUSED_PARAM(exec);
    328     TestSupplemental::setSupplementalStaticAttr(impl, ustringToString(value.isEmpty() ? UString() : value.toString(exec)->value(exec)));
     328    TestSupplemental::setSupplementalStaticAttr(ustringToString(value.isEmpty() ? UString() : value.toString(exec)->value(exec)));
    329329}
    330330
Note: See TracChangeset for help on using the changeset viewer.