Bug 1467363 - Protect access to mTransparentSurface with a lock.

This commit is contained in:
wolfbeast 2018-09-11 11:55:16 +02:00 committed by Roy Tam
commit 80e25ee7e5
3 changed files with 14 additions and 0 deletions

View file

@ -320,6 +320,8 @@ bool nsWindow::OnPaint(HDC aDC, uint32_t aNestingLevel)
#if defined(MOZ_XUL)
// don't support transparency for non-GDI rendering, for now
if (eTransparencyTransparent == mTransparencyMode) {
// This mutex needs to be held when EnsureTransparentSurface is called.
MutexAutoLock lock(mBasicLayersSurface->GetTransparentSurfaceLock());
targetSurface = mBasicLayersSurface->EnsureTransparentSurface();
}
#endif