зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1503055 - Avoid deadlocking when rewinding to avoid a different deadlock, r=mccr8.
--HG-- extra : rebase_source : ce275a13dc60a0b1aeeef81e9bebc9c1b80ccdfa
This commit is contained in:
Родитель
274ff66356
Коммит
93804cc834
|
@ -129,7 +129,8 @@ Lock::Find(void* aNativeLock)
|
||||||
{
|
{
|
||||||
MOZ_RELEASE_ASSERT(IsRecordingOrReplaying());
|
MOZ_RELEASE_ASSERT(IsRecordingOrReplaying());
|
||||||
|
|
||||||
AutoReadSpinLock ex(gLocksLock);
|
Maybe<AutoReadSpinLock> ex;
|
||||||
|
ex.emplace(gLocksLock);
|
||||||
|
|
||||||
if (gLocks) {
|
if (gLocks) {
|
||||||
LockMap::iterator iter = gLocks->find(aNativeLock);
|
LockMap::iterator iter = gLocks->find(aNativeLock);
|
||||||
|
@ -147,6 +148,7 @@ Lock::Find(void* aNativeLock)
|
||||||
// held by idling threads that have not diverged from the recording.
|
// held by idling threads that have not diverged from the recording.
|
||||||
// This will cause the process to deadlock, so rewind instead.
|
// This will cause the process to deadlock, so rewind instead.
|
||||||
if (lock->mOwner && Thread::GetById(lock->mOwner)->IsIdle()) {
|
if (lock->mOwner && Thread::GetById(lock->mOwner)->IsIdle()) {
|
||||||
|
ex.reset();
|
||||||
EnsureNotDivergedFromRecording();
|
EnsureNotDivergedFromRecording();
|
||||||
Unreachable();
|
Unreachable();
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче