Bug 78450

Summary: Add a [V8CustomToJSObject] IDL attribute
Product: WebKit Reporter: Kentaro Hara <haraken>
Component: WebCore JavaScriptAssignee: Kentaro Hara <haraken>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, darin, japhet, macpherson, menard, ojan, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 77393    
Attachments:
Description Flags
Patch none

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
Dunno...
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)

WDTY?
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]
Patch
Comment 7 WebKit Review Bot 2012-02-12 21:36:12 PST
Comment on attachment 126706 [details]
Patch

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.