Bug 79303 - [Supplemental] should support constants
Summary: [Supplemental] should support constants
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kentaro Hara
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-22 16:47 PST by Kentaro Hara
Modified: 2012-02-22 20:38 PST (History)
2 users (show)

See Also:


Attachments
Patch (7.87 KB, patch)
2012-02-22 16:54 PST, Kentaro Hara
no flags Details | Formatted Diff | Diff
patch for landing (9.44 KB, patch)
2012-02-22 17:03 PST, Kentaro Hara
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kentaro Hara 2012-02-22 16:47:37 PST
Given that we have

    interface [Supplemental=Y] X { constant int A = 123; }

then the code generator should generate

    X::A

to refer to the constant. However, the current code generator generates Y::A instead.
Comment 1 Kentaro Hara 2012-02-22 16:54:51 PST
Created attachment 128335 [details]
Patch
Comment 2 Adam Barth 2012-02-22 16:57:03 PST
Comment on attachment 128335 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=128335&action=review

> Source/WebCore/bindings/scripts/CodeGenerator.pm:631
> +                push(@checks, "COMPILE_ASSERT($value == " . $constant->extendedAttributes->{"ImplementedBy"} . "::$name, ${interfaceName}Enum${name}IsWrongUseDoNotCheckConstants);\n");

Do we need to make sure the header is included in the CPP file?
Comment 3 Kentaro Hara 2012-02-22 17:03:24 PST
Created attachment 128338 [details]
patch for landing
Comment 4 Kentaro Hara 2012-02-22 17:04:16 PST
(In reply to comment #2)
> Do we need to make sure the header is included in the CPP file?

Fixed it and committed. Thanks!
Comment 5 WebKit Review Bot 2012-02-22 20:23:50 PST
Comment on attachment 128338 [details]
patch for landing

Clearing flags on attachment: 128338

Committed r108603: <http://trac.webkit.org/changeset/108603>