Bug 658177 - Fix potential deadlock in gVolumeScaleLock. r=roc

This commit is contained in:
Chris Pearce 2011-05-19 21:00:39 +12:00
parent eaaadb6040
commit f13ccdbf75

View File

@ -321,9 +321,9 @@ static mozilla::Mutex* gVolumeScaleLock = nsnull;
static double gVolumeScale = 1.0;
static int VolumeScaleChanged(const char* aPref, void *aClosure) {
mozilla::MutexAutoLock lock(*gVolumeScaleLock);
nsAdoptingString value =
nsContentUtils::GetStringPref("media.volume_scale");
mozilla::MutexAutoLock lock(*gVolumeScaleLock);
if (value.IsEmpty()) {
gVolumeScale = 1.0;
} else {