Bug 1060354 - removing event listeners, r=mfinkle
authorJeffrey Godwyll <jeffgodwyll@gmail.com>
Sun, 31 Aug 2014 14:36:00 +0200
changeset 202951 2aa11bfbdba2c086af112b676b71d00688e10a8f
parent 202950 ed1973bacb155edebbea3dcc679867d8dfd69569
child 202952 3f808f2f3a40cc38a82e16af6b8d0d7f85e1ec75
push id27416
push userryanvm@gmail.com
push dateTue, 02 Sep 2014 17:59:34 +0000
treeherdermozilla-central@bfeddb24df7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs1060354
milestone34.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 1060354 - removing event listeners, r=mfinkle
mobile/android/chrome/content/browser.js
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -2741,19 +2741,19 @@ var LightWeightThemeWebInstaller = {
     Cu.import("resource://gre/modules/LightweightThemeConsumer.jsm", temp);
     let theme = new temp.LightweightThemeConsumer(document);
     BrowserApp.deck.addEventListener("InstallBrowserTheme", this, false, true);
     BrowserApp.deck.addEventListener("PreviewBrowserTheme", this, false, true);
     BrowserApp.deck.addEventListener("ResetBrowserThemePreview", this, false, true);
   },
 
   uninit: function() {
-    BrowserApp.deck.addEventListener("InstallBrowserTheme", this, false, true);
-    BrowserApp.deck.addEventListener("PreviewBrowserTheme", this, false, true);
-    BrowserApp.deck.addEventListener("ResetBrowserThemePreview", this, false, true);
+    BrowserApp.deck.removeEventListener("InstallBrowserTheme", this, false, true);
+    BrowserApp.deck.removeEventListener("PreviewBrowserTheme", this, false, true);
+    BrowserApp.deck.removeEventListener("ResetBrowserThemePreview", this, false, true);
   },
 
   handleEvent: function (event) {
     switch (event.type) {
       case "InstallBrowserTheme":
       case "PreviewBrowserTheme":
       case "ResetBrowserThemePreview":
         // ignore requests from background tabs