diff --git a/widget/gonk/nsAppShell.cpp b/widget/gonk/nsAppShell.cpp index b7b39842b8e4..2e66604746e5 100644 --- a/widget/gonk/nsAppShell.cpp +++ b/widget/gonk/nsAppShell.cpp @@ -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);