Bug 989538 - GetDefaultStorageName should always initialize the returned storageName. r=janv

This commit is contained in:
Dave Hylands 2014-04-01 15:53:43 -07:00
parent c1c18d00d1
commit 109f1499a5

View File

@ -3361,7 +3361,12 @@ nsDOMDeviceStorage::GetDefaultStorageName(const nsAString& aStorageType,
GetOrderedVolumeNames(volNames);
if (volNames.Length() > 0) {
aStorageName = volNames[0];
return;
}
// No volumes available, return the empty string. This is normal for
// b2g-desktop.
aStorageName.Truncate();
}
bool