Bug 1430550 - Don't keep mutex locked if SourceSurfaceSkia::Map fails. r=bas

This was leading to a mutex never being unlocked, eventually causing a
crash when it was destroyed.

MozReview-Commit-ID: JzEDWzKxZ4S

--HG--
extra : rebase_source : c86ad738addbec55f33165d300876f4c675cf5f4
This commit is contained in:
Jamie Nicol 2018-01-18 16:48:08 +00:00
Родитель 06d3f8ffeb
Коммит 17afeef581
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -170,6 +170,9 @@ SourceSurfaceSkia::Map(MapType, MappedSurface *aMappedSurface)
aMappedSurface->mData = GetData();
aMappedSurface->mStride = Stride();
mIsMapped = !!aMappedSurface->mData;
if (!mIsMapped) {
mChangeMutex.Unlock();
}
return mIsMapped;
}