Bug 1001134 - "Gamepad service leaks windows if a page goes into bfcache". r=ted r=continuation
authorOlli Pettay <bugs>
Thu, 24 Apr 2014 14:51:00 +0200
changeset 199657 8f4a613f6b66867988f1b562f2332ae34cc0ff80
parent 199656 8df965877ac49ca9749d4355d56693d9d9522107
child 199658 4d713f81644d35c8ca107f64226a9ca25232c614
push id486
push userasasaki@mozilla.com
push dateMon, 14 Jul 2014 18:39:42 +0000
treeherdermozilla-release@d33428174ff1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted, continuation
bugs1001134
milestone31.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 1001134 - "Gamepad service leaks windows if a page goes into bfcache". r=ted r=continuation
dom/base/nsGlobalWindow.cpp
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -1602,16 +1602,18 @@ nsGlobalWindow::FreeInnerObjects()
   CleanupCachedXBLHandlers(this);
 
   for (uint32_t i = 0; i < mAudioContexts.Length(); ++i) {
     mAudioContexts[i]->Shutdown();
   }
   mAudioContexts.Clear();
 
 #ifdef MOZ_GAMEPAD
+  DisableGamepadUpdates();
+  mHasGamepad = false;
   mGamepads.Clear();
 #endif
 }
 
 //*****************************************************************************
 // nsGlobalWindow::nsISupports
 //*****************************************************************************