Bug 78450 - Add a [V8CustomToJSObject] IDL attribute
Summary: Add a [V8CustomToJSObject] IDL attribute
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kentaro Hara
Depends on:
Blocks: 77393
  Show dependency treegraph
Reported: 2012-02-12 18:24 PST by Kentaro Hara
Modified: 2012-02-12 21:36 PST (History)
7 users (show)

See Also:

Patch (11.44 KB, patch)
2012-02-12 20:30 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 18:24:55 PST
The goal is to remove hard-coding in HasCustomToV8Implementation() in CodeGeneratorV8.pm, in the following steps:

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

In this bug we fixes (1).

Note: The name of [*CustomToWrappedObject] is consistent with [*CustomToNativeObject].
Comment 1 Adam Barth 2012-02-12 18:46:04 PST
Maybe we should just call it V8CustomToJS ?  It's not 100% accurate, but the shorter name seems better and avoids having to renaming the JSC version.
Comment 2 Adam Barth 2012-02-12 18:46:48 PST
Maybe CustomToVM ?
Comment 3 Adam Barth 2012-02-12 18:47:04 PST
Comment 4 Kentaro Hara 2012-02-12 18:52:27 PST
My rating is as follows:-)

- [V8CustomToJSObject] : 1.0  (Naming consistency with [CustomToNativeObject])
- [V8CustomToJS] : 0.8 (It might be confusing in V8, since it actually means [CustomToV8])
- [V8CustomToWrappedObject] : 0.6  ([*WrappedObject] would be unclearer than [*JSObject])
- [CustomToVM] : 0.4  (Not so descriptive)

Comment 5 Adam Barth 2012-02-12 18:54:48 PST
V8CustomToJSObject sounds fine.
Comment 6 Kentaro Hara 2012-02-12 20:30:29 PST
Created attachment 126706 [details]
Comment 7 WebKit Review Bot 2012-02-12 21:36:12 PST
Comment on attachment 126706 [details]

Clearing flags on attachment: 126706

Committed r107530: <http://trac.webkit.org/changeset/107530>
Comment 8 WebKit Review Bot 2012-02-12 21:36:17 PST
All reviewed patches have been landed.  Closing bug.