Bug 777514: Wake the EventHub when nsAppShell is released, allowing the b2g process to exit immediately. r=mwu

--HG--
extra : rebase_source : aec812e54c359008291d77ecd59ddf40e900c859
This commit is contained in:
Marshall Culpepper 2012-08-08 14:11:04 -05:00
parent d0f3123fd5
commit 5f5df0e2d1

View File

@ -495,6 +495,11 @@ 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();
status_t result = mReaderThread->requestExitAndWait();
if (result)
LOG("Could not stop reader thread - %d", result);