Bug 79303

Summary: [Supplemental] should support constants
Product: WebKit Reporter: Kentaro Hara <haraken>
Component: WebCore JavaScriptAssignee: Kentaro Hara <haraken>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
patch for landing none

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>