Merge m-c to inbound.

This commit is contained in:
Ryan VanderMeulen 2013-04-24 21:51:04 -04:00
commit 5c64ef6278
3 changed files with 16 additions and 8 deletions

View File

@ -1,6 +1,6 @@
[{
"size": 647503948,
"digest": "9ba4f195052e0d5eaae734375aed52f52b7b3337fa8caf01a61830529266e282be19697095c88135379c984d7242ec36b384cf81155176bb6527e6621f32eed3",
"size": 659020310,
"digest": "8201020a5214337cf19d43bb3fde8c4624d7a7a71f04a4522a34783194694fe5e66f8087acf6fe7080d7bf787b8311dd9ed8facfbac39198d0121f817b8eef32",
"algorithm": "sha512",
"filename": "emulator.zip"
}]

View File

@ -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"));
}

View File

@ -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<DeviceStorageFile> mFile;
nsRefPtr<DOMRequest> 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;
}