Bug 1738787 - fix deadlock/crash in platform_uithread. r=pehrsons

Don't null hwnd_ until after thread is stoppped to ensure
PlatformUIThread::InternalInit is not still in progress on the
new thread.

Differential Revision: https://phabricator.services.mozilla.com/D131978
This commit is contained in:
Michael Froman 2021-11-29 20:40:57 +00:00
Родитель 2816a6e799
Коммит 01ba098bc5
1 изменённых файлов: 3 добавлений и 2 удалений

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

@ -75,9 +75,10 @@ void PlatformUIThread::Stop() {
PostMessage(hwnd_, WM_CLOSE, 0, 0);
hwnd_ = NULL;
PlatformThread::Stop();
// do this after stop to make sure in-progress operations are finished.
hwnd_ = NULL;
}
void PlatformUIThread::Run() {