Bug 740719 - Fix b2g-gonk shutdown hang. r=cjones
authorJim Straus <jstraus@mozilla.com>
Sat, 09 Jun 2012 17:07:18 -0400
changeset 101093 6a6d022c96b7f4e02757385137127207a5dfb82d
parent 101092 8e8cda8abd8d80c622dd6c079daeed859973bb7b
child 101094 4e3b3452a99392d70d9c9ad9387c26bc557a58c5
push id1316
push userakeybl@mozilla.com
push dateMon, 27 Aug 2012 22:37:00 +0000
treeherdermozilla-beta@db4b09302ee2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscjones
bugs740719
milestone16.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 740719 - Fix b2g-gonk shutdown hang. r=cjones
widget/gonk/nsAppShell.cpp
widget/gonk/nsAppShell.h
--- a/widget/gonk/nsAppShell.cpp
+++ b/widget/gonk/nsAppShell.cpp
@@ -501,16 +501,23 @@ nsAppShell::Init()
     rv = AddFdHandler(signalfds[0], pipeHandler, "");
     NS_ENSURE_SUCCESS(rv, rv);
 
     // Delay initializing input devices until the screen has been
     // initialized (and we know the resolution).
     return rv;
 }
 
+NS_IMETHODIMP
+nsAppShell::Exit()
+{
+  OrientationObserver::GetInstance()->DisableAutoOrientation();
+  return nsBaseAppShell::Exit();
+}
+
 void
 nsAppShell::InitInputDevices()
 {
     mEventHub = new EventHub();
     mReaderPolicy = new GeckoInputReaderPolicy();
     mReaderPolicy->setDisplayInfo();
     mDispatcher = new GeckoInputDispatcher();
 
--- a/widget/gonk/nsAppShell.h
+++ b/widget/gonk/nsAppShell.h
@@ -49,16 +49,19 @@ class InputReaderThread;
 class GeckoInputReaderPolicy;
 class GeckoInputDispatcher;
 
 class nsAppShell : public nsBaseAppShell {
 public:
     nsAppShell();
 
     nsresult Init();
+
+    NS_IMETHOD Exit() MOZ_OVERRIDE;
+
     virtual bool ProcessNextNativeEvent(bool maywait);
 
     void NotifyNativeEvent();
 
     static void NotifyScreenInitialized();
     static void NotifyScreenRotation();
 
 protected: