Bug 47400 - Support DirectoryEntry.removeRecursively for FileSystem API
Summary: Support DirectoryEntry.removeRecursively for FileSystem API
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-08 01:46 PDT by Kinuko Yasuda
Modified: 2010-10-11 04:21 PDT (History)
2 users (show)

See Also:


Attachments
Patch (33.38 KB, patch)
2010-10-08 02:23 PDT, Kinuko Yasuda
levin: 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-10-08 01:46:51 PDT
Support DirectoryEntry.removeRecursively, which is recently added to the latest FileSystem API.

http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#widl-DirectoryEntry-removeRecursively
http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#widl-DirectoryEntrySync-removeRecursively
Comment 1 Kinuko Yasuda 2010-10-08 02:23:19 PDT
Created attachment 70214 [details]
Patch
Comment 2 David Levin 2010-10-11 03:40:17 PDT
Comment on attachment 70214 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=70214&action=review

> WebCore/ChangeLog:8
> +        Also disallows remove/removeRecursively on the root directory.

Is there a test for this one? if not, please add one.

> WebCore/fileapi/DOMFileSystemBase.cpp:128
> +        return false;

This was only returning true before.

Please check that the caller is properly handling false.

> WebCore/fileapi/DirectoryEntry.h:61
> +    virtual void removeRecursively(PassRefPtr<VoidCallback> successCallback = 0, PassRefPtr<ErrorCallback> errorCallback = 0) const;

pls remove virtual.

Also, "successCallback" is a useful name. Please keep it.

But "errorCallback" just repeats the type. Please remove this param name.

> WebCore/fileapi/DirectoryEntrySync.cpp:80
> +        ec = INVALID_MODIFICATION_ERR;

As discussed add a return here.
Comment 3 Kinuko Yasuda 2010-10-11 04:21:50 PDT
Committed r69485: <http://trac.webkit.org/changeset/69485>