зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1007053 - Pt1 - Fix shadowing of IsFake attribute in the Child Volume cache. r=qDot
This commit is contained in:
Родитель
138a3b3961
Коммит
4d43b53eee
|
@ -1690,12 +1690,13 @@ ContentChild::RecvFileSystemUpdate(const nsString& aFsName,
|
|||
const int32_t& aMountGeneration,
|
||||
const bool& aIsMediaPresent,
|
||||
const bool& aIsSharing,
|
||||
const bool& aIsFormatting)
|
||||
const bool& aIsFormatting,
|
||||
const bool& aIsFake)
|
||||
{
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
nsRefPtr<nsVolume> volume = new nsVolume(aFsName, aVolumeName, aState,
|
||||
aMountGeneration, aIsMediaPresent,
|
||||
aIsSharing, aIsFormatting);
|
||||
aIsSharing, aIsFormatting, aIsFake);
|
||||
|
||||
nsRefPtr<nsVolumeService> vs = nsVolumeService::GetSingleton();
|
||||
if (vs) {
|
||||
|
@ -1710,6 +1711,7 @@ ContentChild::RecvFileSystemUpdate(const nsString& aFsName,
|
|||
unused << aIsMediaPresent;
|
||||
unused << aIsSharing;
|
||||
unused << aIsFormatting;
|
||||
unused << aIsFake;
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -256,7 +256,8 @@ public:
|
|||
const int32_t& aMountGeneration,
|
||||
const bool& aIsMediaPresent,
|
||||
const bool& aIsSharing,
|
||||
const bool& aIsFormatting) MOZ_OVERRIDE;
|
||||
const bool& aIsFormatting,
|
||||
const bool& aIsFake) MOZ_OVERRIDE;
|
||||
|
||||
virtual bool RecvNuwaFork() MOZ_OVERRIDE;
|
||||
|
||||
|
|
|
@ -2237,6 +2237,7 @@ ContentParent::Observe(nsISupports* aSubject,
|
|||
bool isMediaPresent;
|
||||
bool isSharing;
|
||||
bool isFormatting;
|
||||
bool isFake;
|
||||
|
||||
vol->GetName(volName);
|
||||
vol->GetMountPoint(mountPoint);
|
||||
|
@ -2245,10 +2246,11 @@ ContentParent::Observe(nsISupports* aSubject,
|
|||
vol->GetIsMediaPresent(&isMediaPresent);
|
||||
vol->GetIsSharing(&isSharing);
|
||||
vol->GetIsFormatting(&isFormatting);
|
||||
vol->GetIsFake(&isFake);
|
||||
|
||||
unused << SendFileSystemUpdate(volName, mountPoint, state,
|
||||
mountGeneration, isMediaPresent,
|
||||
isSharing, isFormatting);
|
||||
isSharing, isFormatting, isFake);
|
||||
} else if (!strcmp(aTopic, "phone-state-changed")) {
|
||||
nsString state(aData);
|
||||
unused << SendNotifyPhoneStateChange(state);
|
||||
|
|
|
@ -388,7 +388,7 @@ child:
|
|||
|
||||
FileSystemUpdate(nsString fsName, nsString mountPoint, int32_t fsState,
|
||||
int32_t mountGeneration, bool isMediaPresent,
|
||||
bool isSharing, bool isFormatting);
|
||||
bool isSharing, bool isFormatting, bool isFake);
|
||||
|
||||
// Ask the Nuwa process to create a new child process.
|
||||
NuwaFork();
|
||||
|
|
|
@ -30,13 +30,13 @@ public:
|
|||
nsVolume(const nsAString& aName, const nsAString& aMountPoint,
|
||||
const int32_t& aState, const int32_t& aMountGeneration,
|
||||
const bool& aIsMediaPresent, const bool& aIsSharing,
|
||||
const bool& aIsFormatting)
|
||||
const bool& aIsFormatting, const bool& aIsFake)
|
||||
: mName(aName),
|
||||
mMountPoint(aMountPoint),
|
||||
mState(aState),
|
||||
mMountGeneration(aMountGeneration),
|
||||
mMountLocked(false),
|
||||
mIsFake(false),
|
||||
mIsFake(aIsFake),
|
||||
mIsMediaPresent(aIsMediaPresent),
|
||||
mIsSharing(aIsSharing),
|
||||
mIsFormatting(aIsFormatting)
|
||||
|
@ -82,7 +82,7 @@ public:
|
|||
typedef nsTArray<nsRefPtr<nsVolume> > Array;
|
||||
|
||||
private:
|
||||
~nsVolume() {}
|
||||
virtual ~nsVolume() {} // MozExternalRefCountType complains if this is non-virtual
|
||||
|
||||
friend class nsVolumeService; // Calls the following XxxMountLock functions
|
||||
void UpdateMountLock(const nsAString& aMountLockState);
|
||||
|
|
|
@ -249,7 +249,8 @@ nsVolumeService::CreateOrGetVolumeByPath(const nsAString& aPath, nsIVolume** aRe
|
|||
-1 /* generation */,
|
||||
true /* isMediaPresent*/,
|
||||
false /* isSharing */,
|
||||
false /* isFormatting */);
|
||||
false /* isFormatting */,
|
||||
true /* isFake */);
|
||||
vol.forget(aResult);
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -382,8 +383,8 @@ nsVolumeService::CreateFakeVolume(const nsAString& name, const nsAString& path)
|
|||
-1 /* mountGeneration */,
|
||||
true /* isMediaPresent */,
|
||||
false /* isSharing */,
|
||||
false /* isFormatting */);
|
||||
vol->SetIsFake(true);
|
||||
false /* isFormatting */,
|
||||
true /* isFake */);
|
||||
vol->LogState();
|
||||
UpdateVolume(vol.get());
|
||||
return NS_OK;
|
||||
|
|
Загрузка…
Ссылка в новой задаче