Bug 109793 - Replace 'DOMObject' with 'any' in WebKit IDL
Summary: Replace 'DOMObject' with 'any' in WebKit IDL
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:
 
Reported: 2013-02-14 01:31 PST by Kentaro Hara
Modified: 2013-02-14 16:27 PST (History)
8 users (show)

See Also:


Attachments
Patch (20.03 KB, patch)
2013-02-14 01:33 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 2013-02-14 01:31:30 PST
In the Web IDL spec, there is no type named 'DOMObject'. It should be 'any'. We should replace all 'DOMObject's in WebKit IDLs with 'any's.
Comment 1 Kentaro Hara 2013-02-14 01:33:08 PST
Created attachment 188283 [details]
Patch
Comment 2 Joseph Pecoraro 2013-02-14 16:07:54 PST
When it was DOMObject it sounded like "this needs to be some kind of object".
Now "any" sounds like "hey this could be anything. A number. An object. A string. Anything!".

To me this hurts clarity / readability. Unless "any" really does mean any type, including primitives like numbers?
Comment 3 Kentaro Hara 2013-02-14 16:13:02 PST
(In reply to comment #2)
> When it was DOMObject it sounded like "this needs to be some kind of object".
> Now "any" sounds like "hey this could be anything. A number. An object. A string. Anything!".

The Web IDL spec says that we should call it "any": http://www.w3.org/TR/WebIDL/#idl-types

> Unless "any" really does mean any type, including primitives like numbers?

"any" does mean any type. Internally it is implemented as a ScriptValue, which can store any JavaScript value.

In the WebKit IDL files, "any" and "DOMObject" have been used interchangeably. Given that it can handle any type, "any" would be a better name than "DOMObject".
Comment 4 Adam Barth 2013-02-14 16:21:57 PST
@joepeck: Our trajectory here is to to match WebIDL.  If you have comments about the readability of WebIDL, you might want to bring that up with the WebApps working group.
Comment 5 WebKit Review Bot 2013-02-14 16:26:57 PST
Comment on attachment 188283 [details]
Patch

Clearing flags on attachment: 188283

Committed r142935: <http://trac.webkit.org/changeset/142935>
Comment 6 WebKit Review Bot 2013-02-14 16:27:01 PST
All reviewed patches have been landed.  Closing bug.