Bug 78466 - Add [JSCustomToJSObject] IDL attribute to interfaces that have custom toJS() but do not have custom toV8()
Summary: Add [JSCustomToJSObject] IDL attribute to interfaces that have custom toJS() ...
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: 77393
  Show dependency treegraph
 
Reported: 2012-02-12 23:56 PST by Kentaro Hara
Modified: 2012-02-13 02:24 PST (History)
5 users (show)

See Also:


Attachments
Patch (5.24 KB, patch)
2012-02-13 00:02 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-12 23:56:38 PST
The goal is to remove hard-coding in HasCustomToV8Implementation() in CodeGeneratorV8.pm, in the following steps:

(1) Add [V8CustomToJSObject] to interfaces which have custom toV8() but do not have custom toJS().
(2) Replace [JSCustomToJS] with [JSCustomToJSObject] for interfaces which have custom toJS() but do not have custom toV8().
(3) Replace [JSCustomToJS] with [CustomToJSObject] for interfaces which have custom toV8() and toJS().
(4) Remove HasCustomToV8Implementation() from CodeGeneratorV8.pm.

In this bug we fixes (2).
Comment 1 Kentaro Hara 2012-02-13 00:02:45 PST
Created attachment 126728 [details]
Patch
Comment 2 Kentaro Hara 2012-02-13 00:11:55 PST
BTW, I noticed the hard-coding had been buggy...:-)

    return 1 if $interfaceName eq "DOMStringMap";
    return 1 if $interfaceName eq "DOMTokenList";
    ...;
    return 0 if $interfaceName eq "DOMStringMap";
    return 0 if $interfaceName eq "DOMTokenList";

http://code.google.com/codesearch#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm&exact_package=chromium&q=codegeneratorv8.pm&type=cs&l=3136
Comment 3 Adam Barth 2012-02-13 00:16:34 PST
> BTW, I noticed the hard-coding had been buggy...:-)

I'm not surprised.  :)
Comment 4 WebKit Review Bot 2012-02-13 02:24:42 PST
Comment on attachment 126728 [details]
Patch

Clearing flags on attachment: 126728

Committed r107553: <http://trac.webkit.org/changeset/107553>
Comment 5 WebKit Review Bot 2012-02-13 02:24:47 PST
All reviewed patches have been landed.  Closing bug.