Bug 75082 - REGRESSION(r102987): Fix the filename prefix of the generated empty .h and .cpp files for [Supplemental] IDLs
Summary: REGRESSION(r102987): Fix the filename prefix of the generated empty .h and .c...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kentaro Hara
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-22 06:05 PST by Kentaro Hara
Modified: 2011-12-25 22:16 PST (History)
3 users (show)

See Also:


Attachments
Patch (2.70 KB, patch)
2011-12-22 06:13 PST, Kentaro Hara
no flags Details | Formatted Diff | Diff
Patch (8.64 KB, patch)
2011-12-24 10:42 PST, Kentaro Hara
no flags Details | Formatted Diff | Diff
Patch (8.59 KB, patch)
2011-12-24 11:10 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 2011-12-22 06:05:39 PST
In bug 74481, we changed generate-bindings.pl so that it generates empty .h and .cpp files for the [Supplemental] IDLs. However, the filename prefix of those .h and .cpp files is wrong.

Current behavior:
generator=JS  => JS*.h, JS*.cpp
generator=V8  => V8*.h, V8*.cpp
generator=ObjC  => ObjC*.h, ObjC*.cpp
generator=GObject  => GObject*.h, GObject*.cpp
generator=CPP  => CPP*.h, CPP*.cpp

Expected behavior:
generator=JS  => JS*.h, JS*.cpp
generator=V8  => V8*.h, V8*.cpp
generator=ObjC  => DOM*.h, DOM*.cpp
generator=GObject  => WebKitDOM*.h, WebKitDOM*.cpp
generator=CPP  => WebDOM*.h, WebDOM*.cpp
Comment 1 Kentaro Hara 2011-12-22 06:13:41 PST
Created attachment 120314 [details]
Patch
Comment 2 Adam Barth 2011-12-22 09:27:58 PST
Comment on attachment 120314 [details]
Patch

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

> Source/WebCore/bindings/scripts/generate-bindings.pl:258
> +    my $prefix = "";
> +    if ($generator eq "JS") {
> +        $prefix = "JS";
> +    } elsif ($generator eq "V8") {
> +        $prefix = "V8";
> +    } elsif ($generator eq "ObjC") {
> +        $prefix = "DOM";
> +    } elsif ($generator eq "GObject") {
> +        $prefix = "WebKitDOM";
> +    } elsif ($generator eq "CPP") {
> +        $prefix = "WebDOM";
> +    } else {
> +        die "Unknown generator: $generator\n";
> +    }

Yuck!  Can we ask the generator what it's prefix should be rather than hardcoding a list of all the generator subclasses?
Comment 3 Kentaro Hara 2011-12-24 10:42:04 PST
Created attachment 120499 [details]
Patch
Comment 4 Kentaro Hara 2011-12-24 11:10:55 PST
Created attachment 120500 [details]
Patch
Comment 5 Kentaro Hara 2011-12-24 11:12:17 PST
(In reply to comment #2)
> (From update of attachment 120314 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=120314&action=review
>
> Yuck!  Can we ask the generator what it's prefix should be rather than hardcoding a list of all the generator subclasses?

Done.
Comment 6 WebKit Review Bot 2011-12-25 22:16:32 PST
Comment on attachment 120500 [details]
Patch

Clearing flags on attachment: 120500

Committed r103678: <http://trac.webkit.org/changeset/103678>
Comment 7 WebKit Review Bot 2011-12-25 22:16:37 PST
All reviewed patches have been landed.  Closing bug.