Bug 45553 - Make FileEntry and DirectoryEntry methods accessible via Entry instance
: Make FileEntry and DirectoryEntry methods accessible via Entry instance
Status: RESOLVED FIXED
Product: WebKit
Classification: Unclassified
Component: WebCore Misc.
: 528+ (Nightly build)
: PC Mac OS X 10.5
: P2 Normal
Assigned To: Nobody
:
Depends on:
Blocks: 42903
  Show dependency treegraph
 
Reported: 2010-09-10 11:30 PDT by Kinuko Yasuda
Modified: 2010-09-30 13:39 PDT (History)
4 users (show)

See Also:


Attachments
Patch (11.57 KB, patch)
2010-09-10 12:02 PDT, Kinuko Yasuda
no flags Details | Formatted Diff | Diff
Patch (20.18 KB, patch)
2010-09-13 17:57 PDT, Kinuko Yasuda
no flags Details | Formatted Diff | Diff
Patch (19.10 KB, patch)
2010-09-13 18:07 PDT, Kinuko Yasuda
abarth: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kinuko Yasuda 2010-09-10 11:30:45 PDT
Make FileEntry and DirectoryEntry methods accessible via Entry instance.

Usually user script obtains an Entry (either file or directory) via callbacks as an 'Entry' instance, but since there's no concept of 'cast' in Javascript the script cannot call FileEntry- or DirectoryEntry-specific methods on the returned 'Entry' instance.

Probably we could add some tricks in the binding code, or the quickest short-term solution would be:
1. (in idl) adding FileEntry- and DirectoryEntry-specific methods to Entry
2. (in c++ impl) making the methods virtual
3. throws an exception if Entry's base implementation is called.
Comment 1 Kinuko Yasuda 2010-09-10 12:02:59 PDT
Created attachment 67219 [details]
Patch

Work-around patch
Comment 2 Kinuko Yasuda 2010-09-13 17:57:42 PDT
Created attachment 67495 [details]
Patch
Comment 3 Adam Barth 2010-09-13 18:05:33 PDT
Comment on attachment 67495 [details]
Patch

great!
Comment 4 Kinuko Yasuda 2010-09-13 18:07:25 PDT
Created attachment 67497 [details]
Patch

Removed unnecessary changes.
Comment 5 Kinuko Yasuda 2010-09-13 18:14:09 PDT
(In reply to comment #3)
> (From update of attachment 67495 [details])
> great!

Oops... mid-air collision :(  Could you r+ one more time on the new one?  Thanks so much.

https://bugs.webkit.org/attachment.cgi?id=67497&action=edit
Comment 6 Kinuko Yasuda 2010-09-13 21:59:43 PDT
Committed r67443: <http://trac.webkit.org/changeset/67443>