Last Comment Bug 760643 - Device Storage - Delete isn't working
: Device Storage - Delete isn't working
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM: Device Interfaces (show other bugs)
: unspecified
: x86 Mac OS X
: -- normal (vote)
: mozilla16
Assigned To: Doug Turner (:dougt)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-01 13:17 PDT by Doug Turner (:dougt)
Modified: 2012-06-05 06:06 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch v.1 (9.52 KB, patch)
2012-06-01 13:22 PDT, Doug Turner (:dougt)
jonas: review+
Details | Diff | Splinter Review

Description Doug Turner (:dougt) 2012-06-01 13:17:36 PDT
Currently Delete() is silently failing.  I am going to change the code to test for existence after delete and fire an onError if the file continues to exists.

We are also incorrectly calculating the path of storage.  I am going to clean up our DeviceStorageFile to always clone() the nsIFile to avoid such problems.
Comment 1 Doug Turner (:dougt) 2012-06-01 13:22:25 PDT
Created attachment 629317 [details] [diff] [review]
patch v.1
Comment 2 Jonas Sicking (:sicking) PTO Until July 5th 2012-06-01 16:48:53 PDT
Comment on attachment 629317 [details] [diff] [review]
patch v.1

Review of attachment 629317 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/devicestorage/nsDeviceStorage.cpp
@@ +43,5 @@
> +    nsCOMPtr<nsIFile> file;
> +    aFile->Clone(getter_AddRefs(mFile));
> +  }
> +  nsCOMPtr<nsIFile> mFile;
> +  nsString mPath;

Put these first or last. Keeping them in the middle makes them hard to find.
Comment 3 Doug Turner (:dougt) 2012-06-02 13:29:56 PDT
last patch broke windows.  fixed up the path, pushed to try, and its good now.  results should be coming soon.
Comment 5 Geoff Lankow (:darktrojan) 2012-06-05 06:06:34 PDT
https://hg.mozilla.org/mozilla-central/rev/efa54ecee724

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