Bug 45553 - Make FileEntry and DirectoryEntry methods accessible via Entry instance
: Make FileEntry and DirectoryEntry methods accessible via Entry instance
Status: RESOLVED FIXED
: WebKit
WebCore Misc.
: 528+ (Nightly build)
: PC Mac OS X 10.5
: P2 Normal
Assigned To:
:
:
:
: 42903
  Show dependency treegraph
 
Reported: 2010-09-10 11:30 PST by
Modified: 2010-09-30 13:39 PST (History)


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


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2010-09-10 11:30:45 PST
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 From 2010-09-10 12:02:59 PST -------
Created an attachment (id=67219) [details]
Patch

Work-around patch
------- Comment #2 From 2010-09-13 17:57:42 PST -------
Created an attachment (id=67495) [details]
Patch
------- Comment #3 From 2010-09-13 18:05:33 PST -------
(From update of attachment 67495 [details])
great!
------- Comment #4 From 2010-09-13 18:07:25 PST -------
Created an attachment (id=67497) [details]
Patch

Removed unnecessary changes.
------- Comment #5 From 2010-09-13 18:14:09 PST -------
(In reply to comment #3)
> (From update of attachment 67495 [details] [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 From 2010-09-13 21:59:43 PST -------
Committed r67443: <http://trac.webkit.org/changeset/67443>