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 180467 8f4a613f6b66867988f1b562f2332ae34cc0ff80
parent 180466 8df965877ac49ca9749d4355d56693d9d9522107
child 180468 4d713f81644d35c8ca107f64226a9ca25232c614
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
reviewersted, continuation
bugs1001134
milestone31.0a1
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
 //*****************************************************************************