diff --git a/b2g/test/emulator.manifest b/b2g/test/emulator.manifest index f955eb3fb594..a6403aac8ccc 100644 --- a/b2g/test/emulator.manifest +++ b/b2g/test/emulator.manifest @@ -1,6 +1,6 @@ [{ -"size": 647503948, -"digest": "9ba4f195052e0d5eaae734375aed52f52b7b3337fa8caf01a61830529266e282be19697095c88135379c984d7242ec36b384cf81155176bb6527e6621f32eed3", +"size": 659020310, +"digest": "8201020a5214337cf19d43bb3fde8c4624d7a7a71f04a4522a34783194694fe5e66f8087acf6fe7080d7bf787b8311dd9ed8facfbac39198d0121f817b8eef32", "algorithm": "sha512", "filename": "emulator.zip" }] diff --git a/dom/devicestorage/DeviceStorageRequestParent.cpp b/dom/devicestorage/DeviceStorageRequestParent.cpp index 8f438445614a..01788a9cfa40 100644 --- a/dom/devicestorage/DeviceStorageRequestParent.cpp +++ b/dom/devicestorage/DeviceStorageRequestParent.cpp @@ -656,7 +656,11 @@ DeviceStorageRequestParent::PostAvailableResultEvent::CancelableRun() nsString state; state.Assign(NS_LITERAL_STRING("available")); #ifdef MOZ_WIDGET_GONK - nsresult rv = GetSDCardStatus(mFile->mPath, state); + nsString path; + nsresult rv = mFile->mFile->GetPath(path); + if (NS_SUCCEEDED(rv)) { + rv = GetSDCardStatus(path, state); + } if (NS_FAILED(rv)) { state.Assign(NS_LITERAL_STRING("unavailable")); } diff --git a/dom/devicestorage/nsDeviceStorage.cpp b/dom/devicestorage/nsDeviceStorage.cpp index 9d8358b0f091..c8d6e64b9b8a 100644 --- a/dom/devicestorage/nsDeviceStorage.cpp +++ b/dom/devicestorage/nsDeviceStorage.cpp @@ -1328,8 +1328,8 @@ nsDOMDeviceStorageCursor::RequestComplete() class PostAvailableResultEvent : public nsRunnable { public: - PostAvailableResultEvent(const nsAString& aPath, DOMRequest* aRequest) - : mPath(aPath) + PostAvailableResultEvent(DeviceStorageFile *aFile, DOMRequest* aRequest) + : mFile(aFile) , mRequest(aRequest) { } @@ -1343,7 +1343,11 @@ public: nsString state; state.Assign(NS_LITERAL_STRING("available")); #ifdef MOZ_WIDGET_GONK - nsresult rv = GetSDCardStatus(mPath, state); + nsString path; + nsresult rv = mFile->mFile->GetPath(path); + if (NS_SUCCEEDED(rv)) { + rv = GetSDCardStatus(path, state); + } if (NS_FAILED(rv)) { state.Assign(NS_LITERAL_STRING("unavailable")); } @@ -1356,7 +1360,7 @@ public: } private: - nsString mPath; + nsRefPtr mFile; nsRefPtr mRequest; }; @@ -1843,7 +1847,7 @@ public: ContentChild::GetSingleton()->SendPDeviceStorageRequestConstructor(child, params); return NS_OK; } - r = new PostAvailableResultEvent(mFile->mPath, mRequest); + r = new PostAvailableResultEvent(mFile, mRequest); NS_DispatchToMainThread(r); return NS_OK; }