зеркало из https://github.com/mozilla/gecko-dev.git
Bug 814549 - Fix OOP app segfault when exiting the app. r=cjones
This commit is contained in:
Родитель
aa99449330
Коммит
40d037c83d
|
@ -592,14 +592,18 @@ nsAppShell::nsAppShell()
|
|||
|
||||
nsAppShell::~nsAppShell()
|
||||
{
|
||||
// We separate requestExit() and join() here so we can wake the EventHub's
|
||||
// input loop, and stop it from polling for input events
|
||||
mReaderThread->requestExit();
|
||||
mEventHub->wake();
|
||||
// mReaderThread and mEventHub will both be null if InitInputDevices
|
||||
// is not called.
|
||||
if (mReaderThread.get()) {
|
||||
// We separate requestExit() and join() here so we can wake the EventHub's
|
||||
// input loop, and stop it from polling for input events
|
||||
mReaderThread->requestExit();
|
||||
mEventHub->wake();
|
||||
|
||||
status_t result = mReaderThread->requestExitAndWait();
|
||||
if (result)
|
||||
LOG("Could not stop reader thread - %d", result);
|
||||
status_t result = mReaderThread->requestExitAndWait();
|
||||
if (result)
|
||||
LOG("Could not stop reader thread - %d", result);
|
||||
}
|
||||
gAppShell = NULL;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче