Bug 1156182 - Ensure nsWindow::Destroy() is called before destroying mPresentLock to avoid a race with the compositor thread. r=Bas

This commit is contained in:
Nicolas Silva 2015-07-02 11:40:53 +02:00
Родитель b56d917f3c
Коммит 930d9df184
1 изменённых файлов: 4 добавлений и 5 удалений

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

@ -409,10 +409,9 @@ nsWindow::~nsWindow()
mInDtor = true; mInDtor = true;
// If the widget was released without calling Destroy() then the native window still // If the widget was released without calling Destroy() then the native window still
// exists, and we need to destroy it. This will also result in a call to OnDestroy. // exists, and we need to destroy it.
// // Destroy() will early-return if it was already called. In any case it is important
// XXX How could this happen??? // to call it before destroying mPresentLock (cf. 1156182).
if (nullptr != mWnd)
Destroy(); Destroy();
// Free app icon resources. This must happen after `OnDestroy` (see bug 708033). // Free app icon resources. This must happen after `OnDestroy` (see bug 708033).