зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1454978 - Move MOZ_ASSERT(mIsMapped) into mChangeMutex. r=bas
We must check mIsMapped inside mChangeMutex or else we could run into a race condition where the source surface is subsequently mapped again before the function terminates. This was being hit on try. MozReview-Commit-ID: 1eot3DVW8VD --HG-- extra : rebase_source : 19f2514d9e2412ee5fe7c99844b7f64f78a7425e
This commit is contained in:
Родитель
ebb0ae9748
Коммит
2f01e497c3
|
@ -170,18 +170,19 @@ SourceSurfaceSkia::Map(MapType, MappedSurface *aMappedSurface)
|
|||
aMappedSurface->mData = GetData();
|
||||
aMappedSurface->mStride = Stride();
|
||||
mIsMapped = !!aMappedSurface->mData;
|
||||
bool isMapped = mIsMapped;
|
||||
if (!mIsMapped) {
|
||||
mChangeMutex.Unlock();
|
||||
}
|
||||
return mIsMapped;
|
||||
return isMapped;
|
||||
}
|
||||
|
||||
void
|
||||
SourceSurfaceSkia::Unmap()
|
||||
{
|
||||
mChangeMutex.Unlock();
|
||||
MOZ_ASSERT(mIsMapped);
|
||||
mIsMapped = false;
|
||||
mChangeMutex.Unlock();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Загрузка…
Ссылка в новой задаче