mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 1440347 - Lock while modifying mAllocations. r=padenot
--HG-- extra : rebase_source : 2f5c6e13e8f930b82ff26190485bb8eed69592e4 extra : histedit_source : 0b3cfe11cdd16ee5bf42eec68196de9531e2c36b
This commit is contained in:
parent
ded2e9e8e2
commit
ce1efe51da
@ -586,7 +586,12 @@ MediaEngineWebRTCMicrophoneSource::Allocate(const dom::MediaTrackConstraints &aC
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
mAllocations.AppendElement(Allocation(handle));
|
||||
|
||||
{
|
||||
MutexAutoLock lock(mMutex);
|
||||
mAllocations.AppendElement(Allocation(handle));
|
||||
}
|
||||
|
||||
handle.forget(aOutHandle);
|
||||
return NS_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user