Bug 1038152 - Make the destructor of WindowsGamepad.cpp's Observer private; r=bjacob
authorEhsan Akhgari <ehsan@mozilla.com>
Mon, 14 Jul 2014 21:49:23 -0400
changeset 215886 736fd22eeef4f1bfbe18e532743ae922ffb98196
parent 215885 c9c1acd7c1c3bb82a76a945621cf8d51078d7752
child 215887 1c6e1080cee1a50145e853c761129dbec448d40b
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbjacob
bugs1038152
milestone33.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 1038152 - Make the destructor of WindowsGamepad.cpp's Observer private; r=bjacob
hal/windows/WindowsGamepad.cpp
--- a/hal/windows/WindowsGamepad.cpp
+++ b/hal/windows/WindowsGamepad.cpp
@@ -276,32 +276,32 @@ public:
     if (mObserving) {
       nsCOMPtr<nsIObserverService> observerService =
         mozilla::services::GetObserverService();
       observerService->RemoveObserver(this, NS_XPCOM_WILL_SHUTDOWN_OBSERVER_ID);
       mObserving = false;
     }
   }
 
-  virtual ~Observer()
-  {
-    Stop();
-  }
-
   void SetDeviceChangeTimer()
   {
     // Set stable timer, since we will get multiple devices-changed
     // notifications at once
     if (mTimer) {
       mTimer->Cancel();
       mTimer->Init(this, kDevicesChangedStableDelay, nsITimer::TYPE_ONE_SHOT);
     }
   }
 
 private:
+  virtual ~Observer()
+  {
+    Stop();
+  }
+
   // Gamepad service owns us, we just hold a reference back to it.
   WindowsGamepadService& mSvc;
   nsCOMPtr<nsITimer> mTimer;
   bool mObserving;
 };
 
 NS_IMPL_ISUPPORTS(Observer, nsIObserver);