Bug 1330147 - automatic removal of the third boolean parameter in removeObserver calls, r=jaws.
authorFlorian Quèze <florian@queze.net>
Wed, 11 Jan 2017 22:27:42 +0100
changeset 328982 8e0b7bc5fd7164d083261a709bdf3dc0266365ca
parent 328981 ac0d90af0af192e2278393292e25df2b6710b4c8
child 328983 224c1524464dd3d5311fce2c403b36f902ea9a6e
push id85601
push userflorian@queze.net
push dateWed, 11 Jan 2017 21:27:40 +0000
treeherdermozilla-inbound@ccf9b5082e8b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs1330147
milestone53.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 1330147 - automatic removal of the third boolean parameter in removeObserver calls, r=jaws.
addon-sdk/source/lib/sdk/preferences/event-target.js
addon-sdk/source/test/leak/leak-utils.js
b2g/components/SafeMode.jsm
browser/base/content/browser-devedition.js
browser/base/content/browser-places.js
browser/base/content/test/general/browser_bug435325.js
browser/base/content/test/general/browser_sanitize-timespans.js
browser/components/customizableui/CustomizeMode.jsm
browser/components/customizableui/test/browser_934951_zoom_in_toolbar.js
browser/components/newtab/NewTabPrefsProvider.jsm
browser/components/newtab/NewTabSearchProvider.jsm
browser/components/originattributes/test/browser/browser_favicon_firstParty.js
browser/components/originattributes/test/browser/browser_favicon_userContextId.js
browser/components/preferences/in-content/search.js
browser/components/privatebrowsing/test/browser/browser_privatebrowsing_favicon.js
browser/components/uitour/test/browser_UITour_detach_tab.js
browser/extensions/pdfjs/content/PdfJs.jsm
browser/extensions/pdfjs/content/PdfjsChromeUtils.jsm
browser/modules/BrowserUsageTelemetry.jsm
browser/modules/ContentCrashHandlers.jsm
browser/modules/test/browser_urlBar_zoom.js
devtools/client/aboutdebugging/test/browser_addons_reload.js
devtools/client/scratchpad/scratchpad.js
devtools/client/scratchpad/test/browser_scratchpad_browser_last_window_closing.js
devtools/client/webide/content/prefs.js
devtools/server/actors/storage.js
devtools/server/actors/tab.js
devtools/server/actors/webextension-inspected-window.js
devtools/server/actors/worker.js
devtools/server/tests/unit/test_register_actor.js
devtools/shared/content-observer.js
devtools/shared/webconsole/network-monitor.js
devtools/shared/webconsole/server-logger-monitor.js
devtools/shared/webconsole/server-logger.js
dom/push/test/xpcshell/head.js
dom/tests/browser/browser_ConsoleAPI_originAttributes.js
gfx/layers/apz/test/mochitest/apz_test_utils.js
gfx/tests/browser/browser_windowless_troubleshoot_crash.js
mobile/android/chrome/content/browser.js
services/cloudsync/CloudSyncAdapters.jsm
testing/mochitest/tests/SimpleTest/EventUtils.js
testing/talos/talos/pageloader/chrome/memory.js
testing/talos/talos/talos-powers/components/TalosPowersService.js
toolkit/components/passwordmgr/test/browser/browser_passwordmgr_observers.js
toolkit/components/reader/AboutReader.jsm
toolkit/components/satchel/test/unit/test_notify.js
toolkit/components/search/tests/xpcshell/test_engineUpdate.js
toolkit/components/telemetry/TelemetrySession.jsm
toolkit/modules/addons/WebNavigation.jsm
toolkit/modules/addons/WebNavigationContent.js
toolkit/mozapps/extensions/internal/XPIProvider.jsm
toolkit/mozapps/extensions/nsBlocklistServiceContent.js
tools/quitter/QuitterObserver.js
--- a/addon-sdk/source/lib/sdk/preferences/event-target.js
+++ b/addon-sdk/source/lib/sdk/preferences/event-target.js
@@ -51,11 +51,11 @@ function onChange(subject, topic, name) 
   }
 }
 
 function destroy() {
   off(this);
 
   // stop listening to preference changes
   let branch = prefTargetNS(this).branch;
-  branch.removeObserver('', prefTargetNS(this).observer, false);
+  branch.removeObserver('', prefTargetNS(this).observer);
   prefTargetNS(this).observer = null;
 }
--- a/addon-sdk/source/test/leak/leak-utils.js
+++ b/addon-sdk/source/test/leak/leak-utils.js
@@ -55,17 +55,17 @@ exports.asyncWindowLeakTest = function*(
   }
   Services.obs.addObserver(windowObserver, "domwindowopened", false);
 
   // Execute the body of the test.
   let testLoader = yield asyncTestFunc(assert);
 
   // Stop tracking new windows and attempt to GC any resources allocated
   // by the test body.
-  Services.obs.removeObserver(windowObserver, "domwindowopened", false);
+  Services.obs.removeObserver(windowObserver, "domwindowopened");
   yield gc();
 
   // Check to see if any of the windows we saw survived the GC.  We consider
   // these leaks.
   assert.ok(weakWindows.length > 0, "should see at least one new window");
   for (let i = 0; i < weakWindows.length; ++i) {
     assert.equal(weakWindows[i].get(), null, "window " + i + " should be GC'd");
   }
--- a/b2g/components/SafeMode.jsm
+++ b/b2g/components/SafeMode.jsm
@@ -40,17 +40,17 @@ this.SafeMode = {
         return Promise.resolve();
       }
     } catch(e) { debug("No current mode available!"); }
 
     // Wait for the preference to toggle.
     return new Promise((aResolve, aReject) => {
       let observer = function(aSubject, aTopic, aData) {
         if (Services.prefs.getCharPref(kSafeModePref)) {
-          Services.prefs.removeObserver(kSafeModePref, observer, false);
+          Services.prefs.removeObserver(kSafeModePref, observer);
           aResolve();
         }
       }
 
       Services.prefs.addObserver(kSafeModePref, observer, false);
     });
   },
 
--- a/browser/base/content/browser-devedition.js
+++ b/browser/base/content/browser-devedition.js
@@ -119,18 +119,18 @@ var DevEdition = {
     } else if (!deveditionThemeEnabled && wasEnabled) {
       this.styleSheet.sheet.disabled = true;
       this.refreshBrowserDisplay();
     }
   },
 
   uninit() {
     Services.prefs.removeObserver(this._devtoolsThemePrefName, this);
-    Services.obs.removeObserver(this, "lightweight-theme-styling-update", false);
-    Services.obs.removeObserver(this, "lightweight-theme-window-updated", false);
+    Services.obs.removeObserver(this, "lightweight-theme-styling-update");
+    Services.obs.removeObserver(this, "lightweight-theme-window-updated");
     if (this.styleSheet) {
       this.styleSheet.removeEventListener("load", this);
     }
     this.styleSheet = null;
   }
 };
 
 // If the DevEdition theme is going to be applied in gBrowserInit.onLoad,
--- a/browser/base/content/browser-places.js
+++ b/browser/base/content/browser-places.js
@@ -1407,17 +1407,17 @@ var BookmarkingUI = {
         updatePlacesContextMenu(shouldHidePrefUI);
       }
     };
 
     let onBookmarksMenuHidden = event => {
       if (event.target == event.currentTarget) {
         updatePlacesContextMenu(true);
 
-        Services.prefs.removeObserver(this.RECENTLY_BOOKMARKED_PREF, prefObserver, false);
+        Services.prefs.removeObserver(this.RECENTLY_BOOKMARKED_PREF, prefObserver);
         PlacesUtils.bookmarks.removeObserver(this._recentlyBookmarkedObserver);
         this._recentlyBookmarkedObserver = null;
         if (placesContextMenu) {
           placesContextMenu.removeEventListener("popupshowing", onPlacesContextMenuShowing);
         }
         bookmarksMenu.removeEventListener("popuphidden", onBookmarksMenuHidden);
       }
     };
--- a/browser/base/content/test/general/browser_bug435325.js
+++ b/browser/base/content/test/general/browser_bug435325.js
@@ -47,17 +47,17 @@ function checkPage(data) {
 
   // Re-enable the proxy so example.com is resolved to localhost, rather than
   // the actual example.com.
   Services.prefs.setIntPref("network.proxy.type", proxyPrefValue);
 
   Services.obs.addObserver(function observer(aSubject, aTopic) {
     ok(!Services.io.offline, "After clicking the Try Again button, we're back " +
                              "online.");
-    Services.obs.removeObserver(observer, "network:offline-status-changed", false);
+    Services.obs.removeObserver(observer, "network:offline-status-changed");
     finish();
   }, "network:offline-status-changed", false);
 
   ContentTask.spawn(gBrowser.selectedBrowser, null, function* () {
     content.document.getElementById("errorTryAgain").click();
   });
 }
 
--- a/browser/base/content/test/general/browser_sanitize-timespans.js
+++ b/browser/base/content/test/general/browser_sanitize-timespans.js
@@ -16,17 +16,17 @@ Cc["@mozilla.org/moz/jssubscript-loader;
 var Sanitizer = tempScope.Sanitizer;
 
 var FormHistory = (Components.utils.import("resource://gre/modules/FormHistory.jsm", {})).FormHistory;
 var Downloads = (Components.utils.import("resource://gre/modules/Downloads.jsm", {})).Downloads;
 
 function promiseFormHistoryRemoved() {
   let deferred = Promise.defer();
   Services.obs.addObserver(function onfh() {
-    Services.obs.removeObserver(onfh, "satchel-storage-changed", false);
+    Services.obs.removeObserver(onfh, "satchel-storage-changed");
     deferred.resolve();
   }, "satchel-storage-changed", false);
   return deferred.promise;
 }
 
 function promiseDownloadRemoved(list) {
   let deferred = Promise.defer();
 
--- a/browser/components/customizableui/CustomizeMode.jsm
+++ b/browser/components/customizableui/CustomizeMode.jsm
@@ -444,17 +444,17 @@ CustomizeMode.prototype = {
     this._transitioning = true;
 
     Task.spawn(function*() {
       yield this.depopulatePalette();
 
       yield this._doTransition(false);
       this.removeLWTStyling();
 
-      Services.obs.removeObserver(this, "lightweight-theme-window-updated", false);
+      Services.obs.removeObserver(this, "lightweight-theme-window-updated");
 
       if (this.browser.selectedTab == gTab) {
         if (gTab.linkedBrowser.currentURI.spec == "about:blank") {
           closeGlobalTab();
         } else {
           unregisterGlobalTab();
         }
       }
--- a/browser/components/customizableui/test/browser_934951_zoom_in_toolbar.js
+++ b/browser/components/customizableui/test/browser_934951_zoom_in_toolbar.js
@@ -55,22 +55,22 @@ add_task(function*() {
   });
   is(parseInt(zoomResetButton.label, 10), 110, "Zoom is still 110% for about:mozilla");
   FullZoom.reset();
 });
 
 function promiseObserverNotification(aObserver) {
   let deferred = Promise.defer();
   function notificationCallback(e) {
-    Services.obs.removeObserver(notificationCallback, aObserver, false);
+    Services.obs.removeObserver(notificationCallback, aObserver);
     clearTimeout(timeoutId);
     deferred.resolve();
   }
   let timeoutId = setTimeout(() => {
-    Services.obs.removeObserver(notificationCallback, aObserver, false);
+    Services.obs.removeObserver(notificationCallback, aObserver);
     deferred.reject("Notification '" + aObserver + "' did not happen within 20 seconds.");
   }, kTimeoutInMS);
   Services.obs.addObserver(notificationCallback, aObserver, false);
   return deferred.promise;
 }
 
 function promiseTabSelect() {
   let deferred = Promise.defer();
--- a/browser/components/newtab/NewTabPrefsProvider.jsm
+++ b/browser/components/newtab/NewTabPrefsProvider.jsm
@@ -93,17 +93,17 @@ PrefsProvider.prototype = {
   init() {
     for (let pref of gPrefsMap.keys()) {
       Services.prefs.addObserver(pref, this, false);
     }
   },
 
   uninit() {
     for (let pref of gPrefsMap.keys()) {
-      Services.prefs.removeObserver(pref, this, false);
+      Services.prefs.removeObserver(pref, this);
     }
   }
 };
 
 /**
  * Singleton that serves as the default new tab pref provider for the grid.
  */
 const gPrefs = new PrefsProvider();
--- a/browser/components/newtab/NewTabSearchProvider.jsm
+++ b/browser/components/newtab/NewTabSearchProvider.jsm
@@ -51,17 +51,17 @@ SearchProvider.prototype = {
   },
 
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver,
     Ci.nsISupportsWeakReference
   ]),
 
   uninit() {
     try {
-      Services.obs.removeObserver(this, CURRENT_ENGINE, true);
+      Services.obs.removeObserver(this, CURRENT_ENGINE);
     } catch (e) {
       Cu.reportError(e);
     }
   },
 
   get searchSuggestionUIStrings() {
     return ContentSearch.searchSuggestionUIStrings;
   },
--- a/browser/components/originattributes/test/browser/browser_favicon_firstParty.js
+++ b/browser/components/originattributes/test/browser/browser_favicon_firstParty.js
@@ -37,17 +37,17 @@ function clearAllPlacesFavicons() {
   let faviconService = Cc["@mozilla.org/browser/favicon-service;1"]
                           .getService(Ci.nsIFaviconService);
 
   return new Promise(resolve => {
     let observer = {
       observe(aSubject, aTopic, aData) {
         if (aTopic === "places-favicons-expired") {
           resolve();
-          Services.obs.removeObserver(observer, "places-favicons-expired", false);
+          Services.obs.removeObserver(observer, "places-favicons-expired");
         }
       }
     };
 
     Services.obs.addObserver(observer, "places-favicons-expired", false);
     faviconService.expireAllFavicons();
   });
 }
@@ -97,17 +97,17 @@ function observeFavicon(aFirstPartyDomai
           let faviconCookie = httpChannel.getRequestHeader("cookie");
 
           is(faviconCookie, aExpectedCookie, "The cookie of the favicon loading is correct.");
         } else {
           ok(false, "Received unexpected topic: ", aTopic);
         }
 
         if (faviconReqXUL && faviconReqPlaces) {
-          Services.obs.removeObserver(observer, "http-on-modify-request", false);
+          Services.obs.removeObserver(observer, "http-on-modify-request");
           resolve();
         }
       }
     };
 
     Services.obs.addObserver(observer, "http-on-modify-request", false);
   });
 }
@@ -127,18 +127,18 @@ function waitOnFaviconResponse(aFaviconU
           }
 
           let result = {
             topic: aTopic,
             firstPartyDomain: loadInfo.originAttributes.firstPartyDomain
           };
 
           resolve(result);
-          Services.obs.removeObserver(observer, "http-on-examine-response", false);
-          Services.obs.removeObserver(observer, "http-on-examine-cached-response", false);
+          Services.obs.removeObserver(observer, "http-on-examine-response");
+          Services.obs.removeObserver(observer, "http-on-examine-cached-response");
         }
       }
     };
 
     Services.obs.addObserver(observer, "http-on-examine-response", false);
     Services.obs.addObserver(observer, "http-on-examine-cached-response", false);
   });
 }
--- a/browser/components/originattributes/test/browser/browser_favicon_userContextId.js
+++ b/browser/components/originattributes/test/browser/browser_favicon_userContextId.js
@@ -37,17 +37,17 @@ function clearAllPlacesFavicons() {
   let faviconService = Cc["@mozilla.org/browser/favicon-service;1"]
                           .getService(Ci.nsIFaviconService);
 
   return new Promise(resolve => {
     let observer = {
       observe(aSubject, aTopic, aData) {
         if (aTopic === "places-favicons-expired") {
           resolve();
-          Services.obs.removeObserver(observer, "places-favicons-expired", false);
+          Services.obs.removeObserver(observer, "places-favicons-expired");
         }
       }
     };
 
     Services.obs.addObserver(observer, "places-favicons-expired", false);
     faviconService.expireAllFavicons();
   });
 }
@@ -191,17 +191,17 @@ function* doTest(aTestPage, aFaviconHost
 
   // Reset the observer for observing requests for the work container.
   observer.reset(USER_CONTEXT_ID_WORK, cookies[1], pageURI, aFaviconURL);
   tabInfo = yield openTabInUserContext(aTestPage, USER_CONTEXT_ID_WORK);
 
   // Waiting for favicon requests are all made.
   yield observer.promise;
 
-  Services.obs.removeObserver(observer, "http-on-modify-request", false);
+  Services.obs.removeObserver(observer, "http-on-modify-request");
 
   yield BrowserTestUtils.removeTab(tabInfo.tab);
 }
 
 add_task(function* setup() {
   // Make sure userContext is enabled.
   yield SpecialPowers.pushPrefEnv({"set": [
       ["privacy.userContext.enabled", true]
--- a/browser/components/preferences/in-content/search.js
+++ b/browser/components/preferences/in-content/search.js
@@ -36,17 +36,17 @@ var gSearchPane = {
     window.addEventListener("command", this, false);
     window.addEventListener("dragstart", this, false);
     window.addEventListener("keypress", this, false);
     window.addEventListener("select", this, false);
     window.addEventListener("blur", this, true);
 
     Services.obs.addObserver(this, "browser-search-engine-modified", false);
     window.addEventListener("unload", () => {
-      Services.obs.removeObserver(this, "browser-search-engine-modified", false);
+      Services.obs.removeObserver(this, "browser-search-engine-modified");
     });
 
     this._initAutocomplete();
 
     let suggestsPref =
       document.getElementById("browser.search.suggest.enabled");
     suggestsPref.addEventListener("change", () => {
       this.updateSuggestsCheckbox();
--- a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_favicon.js
+++ b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_favicon.js
@@ -30,17 +30,17 @@ function clearAllPlacesFavicons() {
   let faviconService = Cc["@mozilla.org/browser/favicon-service;1"]
                           .getService(Ci.nsIFaviconService);
 
   return new Promise(resolve => {
     let observer = {
       observe(aSubject, aTopic, aData) {
         if (aTopic === "places-favicons-expired") {
           resolve();
-          Services.obs.removeObserver(observer, "places-favicons-expired", false);
+          Services.obs.removeObserver(observer, "places-favicons-expired");
         }
       }
     };
 
     Services.obs.addObserver(observer, "places-favicons-expired", false);
     faviconService.expireAllFavicons();
   });
 }
@@ -100,17 +100,17 @@ function observeFavicon(aIsPrivate, aExp
 
           is(faviconCookie, aExpectedCookie, "The cookie of the favicon loading is correct.");
         } else {
           ok(false, "Received unexpected topic: ", aTopic);
         }
 
         if (faviconReqXUL && faviconReqPlaces) {
           resolve();
-          Services.obs.removeObserver(observer, "http-on-modify-request", false);
+          Services.obs.removeObserver(observer, "http-on-modify-request");
         }
       }
     };
 
     Services.obs.addObserver(observer, "http-on-modify-request", false);
   });
 }
 
@@ -129,18 +129,18 @@ function waitOnFaviconResponse(aFaviconU
           }
 
           let result = {
             topic: aTopic,
             privateBrowsingId: loadInfo.originAttributes.privateBrowsingId
           };
 
           resolve(result);
-          Services.obs.removeObserver(observer, "http-on-examine-response", false);
-          Services.obs.removeObserver(observer, "http-on-examine-cached-response", false);
+          Services.obs.removeObserver(observer, "http-on-examine-response");
+          Services.obs.removeObserver(observer, "http-on-examine-cached-response");
         }
       }
     };
 
     Services.obs.addObserver(observer, "http-on-examine-response", false);
     Services.obs.addObserver(observer, "http-on-examine-cached-response", false);
   });
 }
--- a/browser/components/uitour/test/browser_UITour_detach_tab.js
+++ b/browser/components/uitour/test/browser_UITour_detach_tab.js
@@ -27,17 +27,17 @@ function test() {
 var tests = [
   taskify(function* test_move_tab_to_new_window() {
     const myDocIdentifier = "Hello, I'm a unique expando to identify this document.";
 
     let highlight = document.getElementById("UITourHighlight");
     let windowDestroyedDeferred = Promise.defer();
     let onDOMWindowDestroyed = (aWindow) => {
       if (gContentWindow && aWindow == gContentWindow) {
-        Services.obs.removeObserver(onDOMWindowDestroyed, "dom-window-destroyed", false);
+        Services.obs.removeObserver(onDOMWindowDestroyed, "dom-window-destroyed");
         windowDestroyedDeferred.resolve();
       }
     };
 
     let browserStartupDeferred = Promise.defer();
     Services.obs.addObserver(function onBrowserDelayedStartup(aWindow) {
       Services.obs.removeObserver(onBrowserDelayedStartup, "browser-delayed-startup-finished");
       browserStartupDeferred.resolve(aWindow);
--- a/browser/extensions/pdfjs/content/PdfJs.jsm
+++ b/browser/extensions/pdfjs/content/PdfJs.jsm
@@ -192,21 +192,21 @@ var PdfJs = {
       this._ensureRegistered();
     } else {
       this._ensureUnregistered();
     }
   },
 
   uninit: function uninit() {
     if (this._initialized) {
-      Services.prefs.removeObserver(PREF_DISABLED, this, false);
-      Services.prefs.removeObserver(PREF_DISABLED_PLUGIN_TYPES, this, false);
-      Services.obs.removeObserver(this, TOPIC_PDFJS_HANDLER_CHANGED, false);
-      Services.obs.removeObserver(this, TOPIC_PLUGINS_LIST_UPDATED, false);
-      Services.obs.removeObserver(this, TOPIC_PLUGIN_INFO_UPDATED, false);
+      Services.prefs.removeObserver(PREF_DISABLED, this);
+      Services.prefs.removeObserver(PREF_DISABLED_PLUGIN_TYPES, this);
+      Services.obs.removeObserver(this, TOPIC_PDFJS_HANDLER_CHANGED);
+      Services.obs.removeObserver(this, TOPIC_PLUGINS_LIST_UPDATED);
+      Services.obs.removeObserver(this, TOPIC_PLUGIN_INFO_UPDATED);
       this._initialized = false;
     }
     this._ensureUnregistered();
   },
 
   _migrate: function migrate() {
     const VERSION = 2;
     var currentVersion = getIntPref(PREF_MIGRATION_VERSION, 0);
--- a/browser/extensions/pdfjs/content/PdfjsChromeUtils.jsm
+++ b/browser/extensions/pdfjs/content/PdfjsChromeUtils.jsm
@@ -105,17 +105,17 @@ var PdfjsChromeUtils = {
                                        this);
 
       this._mmg.removeMessageListener('PDFJS:Parent:displayWarning', this);
 
       this._mmg.removeMessageListener('PDFJS:Parent:addEventListener', this);
       this._mmg.removeMessageListener('PDFJS:Parent:removeEventListener', this);
       this._mmg.removeMessageListener('PDFJS:Parent:updateControlState', this);
 
-      Services.obs.removeObserver(this, 'quit-application', false);
+      Services.obs.removeObserver(this, 'quit-application');
 
       this._mmg = null;
       this._ppmm = null;
     }
   },
 
   /*
    * Called by the main module when preference changes are picked up
--- a/browser/modules/BrowserUsageTelemetry.jsm
+++ b/browser/modules/BrowserUsageTelemetry.jsm
@@ -207,17 +207,17 @@ let URICountListener = {
 };
 
 let urlbarListener = {
   init() {
     Services.obs.addObserver(this, AUTOCOMPLETE_ENTER_TEXT_TOPIC, true);
   },
 
   uninit() {
-    Services.obs.removeObserver(this, AUTOCOMPLETE_ENTER_TEXT_TOPIC, true);
+    Services.obs.removeObserver(this, AUTOCOMPLETE_ENTER_TEXT_TOPIC);
   },
 
   observe(subject, topic, data) {
     switch (topic) {
       case AUTOCOMPLETE_ENTER_TEXT_TOPIC:
         this._handleURLBarTelemetry(subject.QueryInterface(Ci.nsIAutoCompleteInput));
         break;
     }
@@ -295,19 +295,19 @@ let BrowserUsageTelemetry = {
     Services.telemetry.scalarSetMaximum(MAX_TAB_COUNT_SCALAR_NAME, counts.tabCount);
     Services.telemetry.scalarSetMaximum(MAX_WINDOW_COUNT_SCALAR_NAME, counts.winCount);
 
     // Reset the URI counter.
     URICountListener.reset();
   },
 
   uninit() {
-    Services.obs.removeObserver(this, DOMWINDOW_OPENED_TOPIC, false);
-    Services.obs.removeObserver(this, TELEMETRY_SUBSESSIONSPLIT_TOPIC, false);
-    Services.obs.removeObserver(this, WINDOWS_RESTORED_TOPIC, false);
+    Services.obs.removeObserver(this, DOMWINDOW_OPENED_TOPIC);
+    Services.obs.removeObserver(this, TELEMETRY_SUBSESSIONSPLIT_TOPIC);
+    Services.obs.removeObserver(this, WINDOWS_RESTORED_TOPIC);
     urlbarListener.uninit();
   },
 
   observe(subject, topic, data) {
     switch (topic) {
       case WINDOWS_RESTORED_TOPIC:
         this._setupAfterRestore();
         break;
--- a/browser/modules/ContentCrashHandlers.jsm
+++ b/browser/modules/ContentCrashHandlers.jsm
@@ -904,19 +904,19 @@ this.PluginCrashReporter = {
     this.crashReports = new Map();
 
     Services.obs.addObserver(this, "plugin-crashed", false);
     Services.obs.addObserver(this, "gmp-plugin-crash", false);
     Services.obs.addObserver(this, "profile-after-change", false);
   },
 
   uninit() {
-    Services.obs.removeObserver(this, "plugin-crashed", false);
-    Services.obs.removeObserver(this, "gmp-plugin-crash", false);
-    Services.obs.removeObserver(this, "profile-after-change", false);
+    Services.obs.removeObserver(this, "plugin-crashed");
+    Services.obs.removeObserver(this, "gmp-plugin-crash");
+    Services.obs.removeObserver(this, "profile-after-change");
     this.initialized = false;
   },
 
   observe(subject, topic, data) {
     switch (topic) {
       case "plugin-crashed": {
         let propertyBag = subject;
         if (!(propertyBag instanceof Ci.nsIPropertyBag2) ||
--- a/browser/modules/test/browser_urlBar_zoom.js
+++ b/browser/modules/test/browser_urlBar_zoom.js
@@ -55,19 +55,19 @@ add_task(function* asyncCleanup() {
     ok(!document.getElementById("zoom-controls"), "Customizable zoom widget removed from toolbar");
   }
 
 });
 
 function promiseObserverNotification(aObserver) {
   let deferred = Promise.defer();
   function notificationCallback(e) {
-    Services.obs.removeObserver(notificationCallback, aObserver, false);
+    Services.obs.removeObserver(notificationCallback, aObserver);
     clearTimeout(timeoutId);
     deferred.resolve();
   }
   let timeoutId = setTimeout(() => {
-    Services.obs.removeObserver(notificationCallback, aObserver, false);
+    Services.obs.removeObserver(notificationCallback, aObserver);
     deferred.reject("Notification '" + aObserver + "' did not happen within 20 seconds.");
   }, kTimeoutInMS);
   Services.obs.addObserver(notificationCallback, aObserver, false);
   return deferred.promise;
 }
--- a/devtools/client/aboutdebugging/test/browser_addons_reload.js
+++ b/devtools/client/aboutdebugging/test/browser_addons_reload.js
@@ -117,17 +117,17 @@ add_task(function* reloadButtonReloadsAd
 
   const reloadButton = getReloadButton(document, ADDON_NAME);
   is(reloadButton.disabled, false, "Reload button should not be disabled");
   is(reloadButton.title, "", "Reload button should not have a tooltip");
   const onInstalled = promiseAddonEvent("onInstalled");
 
   const onBootstrapInstallCalled = new Promise(done => {
     Services.obs.addObserver(function listener() {
-      Services.obs.removeObserver(listener, ADDON_NAME, false);
+      Services.obs.removeObserver(listener, ADDON_NAME);
       info("Add-on was re-installed: " + ADDON_NAME);
       done();
     }, ADDON_NAME, false);
   });
 
   reloadButton.click();
 
   const [reloadedAddon] = yield onInstalled;
--- a/devtools/client/scratchpad/scratchpad.js
+++ b/devtools/client/scratchpad/scratchpad.js
@@ -2461,18 +2461,17 @@ var CloseObserver = {
   uninit: function CO_uninit()
   {
     // Will throw exception if removeObserver is called twice.
     if (this._uninited) {
       return;
     }
 
     this._uninited = true;
-    Services.obs.removeObserver(this, "browser-lastwindow-close-requested",
-                                false);
+    Services.obs.removeObserver(this, "browser-lastwindow-close-requested");
   },
 };
 
 XPCOMUtils.defineLazyGetter(Scratchpad, "strings", function () {
   return Services.strings.createBundle(SCRATCHPAD_L10N);
 });
 
 addEventListener("load", Scratchpad.onLoad.bind(Scratchpad), false);
--- a/devtools/client/scratchpad/test/browser_scratchpad_browser_last_window_closing.js
+++ b/devtools/client/scratchpad/test/browser_scratchpad_browser_last_window_closing.js
@@ -69,11 +69,11 @@ var CloseObserver = {
     aSubject.QueryInterface(Ci.nsISupportsPRBool);
     let message = this.expectedValue ? "close" : "stay open";
     ok(this.expectedValue === aSubject.data, "Expected browser to " + message);
     aSubject.data = true;
   },
 
   uninit: function ()
   {
-    Services.obs.removeObserver(this, "browser-lastwindow-close-requested", false);
+    Services.obs.removeObserver(this, "browser-lastwindow-close-requested");
   },
 };
--- a/devtools/client/webide/content/prefs.js
+++ b/devtools/client/webide/content/prefs.js
@@ -29,17 +29,17 @@ window.addEventListener("load", function
 }, true);
 
 window.addEventListener("unload", function onUnload() {
   window.removeEventListener("unload", onUnload);
   let inputs = document.querySelectorAll("[data-pref]");
   for (let i of inputs) {
     let pref = i.dataset.pref;
     i.removeEventListener("change", SaveForm, false);
-    Services.prefs.removeObserver(pref, FillForm, false);
+    Services.prefs.removeObserver(pref, FillForm);
   }
 }, true);
 
 function CloseUI() {
   window.parent.UI.openProject();
 }
 
 function ShowAddons() {
--- a/devtools/server/actors/storage.js
+++ b/devtools/server/actors/storage.js
@@ -164,17 +164,17 @@ StorageActors.defaults = function (typeN
       this.onWindowDestroyed = this.onWindowDestroyed.bind(this);
       events.on(this.storageActor, "window-ready", this.onWindowReady);
       events.on(this.storageActor, "window-destroyed", this.onWindowDestroyed);
     },
 
     destroy() {
       if (observationTopics) {
         observationTopics.forEach((observationTopic) => {
-          Services.obs.removeObserver(this, observationTopic, false);
+          Services.obs.removeObserver(this, observationTopic);
         });
       }
       events.off(this.storageActor, "window-ready", this.onWindowReady);
       events.off(this.storageActor, "window-destroyed", this.onWindowDestroyed);
 
       this.hostVsStores.clear();
 
       protocol.Actor.prototype.destroy.call(this);
@@ -889,17 +889,17 @@ var cookieHelpers = {
   },
 
   addCookieObservers() {
     Services.obs.addObserver(cookieHelpers, "cookie-changed", false);
     return null;
   },
 
   removeCookieObservers() {
-    Services.obs.removeObserver(cookieHelpers, "cookie-changed", false);
+    Services.obs.removeObserver(cookieHelpers, "cookie-changed");
     return null;
   },
 
   observe(subject, topic, data) {
     if (!subject) {
       return;
     }
 
@@ -2456,18 +2456,18 @@ let StorageActor = protocol.ActorClassWi
     this.destroyed = false;
     this.boundUpdate = {};
   },
 
   destroy() {
     clearTimeout(this.batchTimer);
     this.batchTimer = null;
     // Remove observers
-    Services.obs.removeObserver(this, "content-document-global-created", false);
-    Services.obs.removeObserver(this, "inner-window-destroyed", false);
+    Services.obs.removeObserver(this, "content-document-global-created");
+    Services.obs.removeObserver(this, "inner-window-destroyed");
     this.destroyed = true;
     if (this.parentActor.browser) {
       this.parentActor.browser.removeEventListener("pageshow", this.onPageChange, true);
       this.parentActor.browser.removeEventListener("pagehide", this.onPageChange, true);
     }
     // Destroy the registered store types
     for (let actor of this.childActorPool.values()) {
       actor.destroy();
--- a/devtools/server/actors/tab.js
+++ b/devtools/server/actors/tab.js
@@ -1493,17 +1493,17 @@ function DebuggerProgressListener(tabAct
 DebuggerProgressListener.prototype = {
   QueryInterface: XPCOMUtils.generateQI([
     Ci.nsIWebProgressListener,
     Ci.nsISupportsWeakReference,
     Ci.nsISupports,
   ]),
 
   destroy() {
-    Services.obs.removeObserver(this, "inner-window-destroyed", false);
+    Services.obs.removeObserver(this, "inner-window-destroyed");
     this._knownWindowIDs.clear();
     this._knownWindowIDs = null;
   },
 
   watch(docShell) {
     // Add the docshell to the watched set. We're actually adding the window,
     // because docShell objects are not wrappercached and would be rejected
     // by the WeakSet.
--- a/devtools/server/actors/webextension-inspected-window.js
+++ b/devtools/server/actors/webextension-inspected-window.js
@@ -161,17 +161,17 @@ CustomizedReload.prototype = {
   stop(error) {
     if (this.stopped) {
       return;
     }
 
     this.docShell.removeProgressListener(this);
 
     if (this.injectedScript) {
-      Services.obs.removeObserver(this, "document-element-inserted", false);
+      Services.obs.removeObserver(this, "document-element-inserted");
     }
 
     // Reset the customized user agent.
     if (this.userAgent && this.docShell.customUserAgent == this.userAgent) {
       this.docShell.customUserAgent = null;
     }
 
     if (error) {
--- a/devtools/server/actors/worker.js
+++ b/devtools/server/actors/worker.js
@@ -297,17 +297,17 @@ protocol.ActorClassWithSpec(serviceWorke
       // - In non-e10s: registrations always have at least one worker, if the worker is
       // active, the registration is active.
       active: isE10s ? true : !!activeWorker
     };
   },
 
   destroy() {
     protocol.Actor.prototype.destroy.call(this);
-    Services.obs.removeObserver(this, PushService.subscriptionModifiedTopic, false);
+    Services.obs.removeObserver(this, PushService.subscriptionModifiedTopic);
     this._registration.removeListener(this);
     this._registration = null;
     if (this._pushSubscriptionActor) {
       this._pushSubscriptionActor.destroy();
     }
     this._pushSubscriptionActor = null;
 
     this._installingWorker.destroy();
--- a/devtools/server/tests/unit/test_register_actor.js
+++ b/devtools/server/tests/unit/test_register_actor.js
@@ -87,17 +87,17 @@ function test_lazy_api() {
   }
   function onRequest(aResponse) {
     do_check_eq(aResponse, "world");
 
     // Finally, the actor is loaded on the first request being made to it
     do_check_true(isActorLoaded);
     do_check_true(isActorInstanciated);
 
-    Services.obs.removeObserver(onActorEvent, "actor", false);
+    Services.obs.removeObserver(onActorEvent, "actor");
     client.close().then(() => run_next_test());
   }
 }
 
 function cleanup() {
   DebuggerServer.destroy();
 
   // Check that all actors are unregistered on server destruction
--- a/devtools/shared/content-observer.js
+++ b/devtools/shared/content-observer.js
@@ -33,19 +33,19 @@ ContentObserver.prototype = {
       this._onInnerWindowDestroyed, "inner-window-destroyed", false);
   },
 
   /**
    * Stops listening for the required observer messages.
    */
   stopListening: function () {
     Services.obs.removeObserver(
-      this._onContentGlobalCreated, "content-document-global-created", false);
+      this._onContentGlobalCreated, "content-document-global-created");
     Services.obs.removeObserver(
-      this._onInnerWindowDestroyed, "inner-window-destroyed", false);
+      this._onInnerWindowDestroyed, "inner-window-destroyed");
   },
 
   /**
    * Fired immediately after a web content document window has been set up.
    */
   _onContentGlobalCreated: function (subject, topic, data) {
     if (subject == this._contentWindow) {
       events.emit(this, "global-created", subject);
--- a/devtools/shared/webconsole/network-monitor.js
+++ b/devtools/shared/webconsole/network-monitor.js
@@ -1484,17 +1484,17 @@ NetworkMonitor.prototype = {
   destroy: function () {
     if (Services.appinfo.processType != Ci.nsIXULRuntime.PROCESS_TYPE_CONTENT) {
       gActivityDistributor.removeObserver(this);
       Services.obs.removeObserver(this._httpResponseExaminer,
                                   "http-on-examine-response");
       Services.obs.removeObserver(this._httpResponseExaminer,
                                   "http-on-examine-cached-response");
       Services.obs.removeObserver(this._httpModifyExaminer,
-                                  "http-on-modify-request", false);
+                                  "http-on-modify-request");
     }
 
     Services.obs.removeObserver(this._serviceWorkerRequest,
                                 "service-worker-synthesized-response");
 
     this.interceptedChannels.clear();
     this.openRequests = {};
     this.openResponses = {};
--- a/devtools/shared/webconsole/server-logger-monitor.js
+++ b/devtools/shared/webconsole/server-logger-monitor.js
@@ -117,17 +117,17 @@ var ServerLoggerMonitor = {
     let size = this.targets.size;
     trace.log("ServerLoggerMonitor.onDetachChild; size: ", size, target);
 
     // If this is the last child process attached, unregister
     // the global HTTP observer.
     if (!size) {
       trace.log("ServerLoggerMonitor.onDetachChild; Remove HTTP Observer");
       Services.obs.removeObserver(this.onExamineResponse,
-        "http-on-examine-response", false);
+        "http-on-examine-response");
     }
   },
 
   // HTTP Observer
 
   onExamineResponse: makeInfallible(function (subject, topic) {
     let httpChannel = subject.QueryInterface(Ci.nsIHttpChannel);
 
--- a/devtools/shared/webconsole/server-logger.js
+++ b/devtools/shared/webconsole/server-logger.js
@@ -96,17 +96,17 @@ var ServerLoggingListener = Class({
    */
   detach: makeInfallible(function () {
     trace.log("ServerLoggingListener.detach; ", this.owner.actorID);
 
     if (DebuggerServer.isInChildProcess) {
       this.detachParentProcess();
     } else {
       Services.obs.removeObserver(this.onExamineResponse,
-        "http-on-examine-response", false);
+        "http-on-examine-response");
     }
   }),
 
   // Parent Child Relationship
 
   attachParentProcess: function () {
     trace.log("ServerLoggingListener.attachParentProcess;");
 
--- a/dom/push/test/xpcshell/head.js
+++ b/dom/push/test/xpcshell/head.js
@@ -27,17 +27,17 @@ const WEBSOCKET_CLOSE_GOING_AWAY = 1001;
 const MS_IN_ONE_DAY = 24 * 60 * 60 * 1000;
 
 var isParent = Cc['@mozilla.org/xre/runtime;1']
                  .getService(Ci.nsIXULRuntime).processType ==
                  Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT;
 
 // Stop and clean up after the PushService.
 Services.obs.addObserver(function observe(subject, topic, data) {
-  Services.obs.removeObserver(observe, topic, false);
+  Services.obs.removeObserver(observe, topic);
   serviceExports.PushService.uninit();
   // Occasionally, `profile-change-teardown` and `xpcom-shutdown` will fire
   // before the PushService and AlarmService finish writing to IndexedDB. This
   // causes spurious errors and crashes, so we spin the event loop to let the
   // writes finish.
   let done = false;
   setTimeout(() => done = true, 1000);
   let thread = Services.tm.mainThread;
@@ -87,17 +87,17 @@ function waterfall(...callbacks) {
  */
 function promiseObserverNotification(topic, matchFunc) {
   return new Promise((resolve, reject) => {
     Services.obs.addObserver(function observe(subject, topic, data) {
       let matches = typeof matchFunc != 'function' || matchFunc(subject, data);
       if (!matches) {
         return;
       }
-      Services.obs.removeObserver(observe, topic, false);
+      Services.obs.removeObserver(observe, topic);
       resolve({subject, data});
     }, topic, false);
   });
 }
 
 /**
  * Wraps an object in a proxy that traps property gets and returns stubs. If
  * the stub is a function, the original value will be passed as the first
--- a/dom/tests/browser/browser_ConsoleAPI_originAttributes.js
+++ b/dom/tests/browser/browser_ConsoleAPI_originAttributes.js
@@ -10,17 +10,17 @@ const EXPECTED_CONSOLE_MESSAGE_CONTENT =
 const ConsoleObserver = {
   QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
 
   init() {
     Services.obs.addObserver(this, "console-api-log-event", false);
   },
 
   uninit() {
-    Services.obs.removeObserver(this, "console-api-log-event", false);
+    Services.obs.removeObserver(this, "console-api-log-event");
   },
 
   observe(aSubject, aTopic, aData) {
     if (aTopic == "console-api-log-event") {
       let consoleAPIMessage = aSubject.wrappedJSObject;
 
       is(consoleAPIMessage.arguments[0], EXPECTED_CONSOLE_MESSAGE_CONTENT,
          "the consoleAPIMessage contains the expected message");
--- a/gfx/layers/apz/test/mochitest/apz_test_utils.js
+++ b/gfx/layers/apz/test/mochitest/apz_test_utils.js
@@ -115,17 +115,17 @@ function isLayerized(elementId) {
   return false;
 }
 
 function flushApzRepaints(aCallback, aWindow = window) {
   if (!aCallback) {
     throw "A callback must be provided!";
   }
   var repaintDone = function() {
-    SpecialPowers.Services.obs.removeObserver(repaintDone, "apz-repaints-flushed", false);
+    SpecialPowers.Services.obs.removeObserver(repaintDone, "apz-repaints-flushed");
     setTimeout(aCallback, 0);
   };
   SpecialPowers.Services.obs.addObserver(repaintDone, "apz-repaints-flushed", false);
   if (SpecialPowers.getDOMWindowUtils(aWindow).flushApzRepaints()) {
     dump("Flushed APZ repaints, waiting for callback...\n");
   } else {
     dump("Flushing APZ repaints was a no-op, triggering callback directly...\n");
     repaintDone();
--- a/gfx/tests/browser/browser_windowless_troubleshoot_crash.js
+++ b/gfx/tests/browser/browser_windowless_troubleshoot_crash.js
@@ -9,17 +9,17 @@ add_task(function* test_windowlessBrowse
     let listener = {
       observe(contentWindow, topic, data) {
         let observedDocShell = contentWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                                             .getInterface(Ci.nsIWebNavigation)
                                             .QueryInterface(Ci.nsIDocShellTreeItem)
                                             .sameTypeRootTreeItem
                                             .QueryInterface(Ci.nsIDocShell);
           if (docShell === observedDocShell) {
-            Services.obs.removeObserver(listener, "content-document-global-created", false);
+            Services.obs.removeObserver(listener, "content-document-global-created");
             resolve();
           }
         }
     }
     Services.obs.addObserver(listener, "content-document-global-created", false);
   });
   webNav.loadURI("about:blank", 0, null, null, null);
 
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -1530,17 +1530,17 @@ var BrowserApp = {
       return;
 
     let dwu = aBrowser.contentWindow.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
     if (!dwu) {
       return;
     }
 
     let apzFlushDone = function() {
-      Services.obs.removeObserver(apzFlushDone, "apz-repaints-flushed", false);
+      Services.obs.removeObserver(apzFlushDone, "apz-repaints-flushed");
       dwu.zoomToFocusedInput();
     };
 
     let paintDone = function() {
       window.removeEventListener("MozAfterPaint", paintDone, false);
       if (dwu.flushApzRepaints()) {
         Services.obs.addObserver(apzFlushDone, "apz-repaints-flushed", false);
       } else {
@@ -3642,18 +3642,18 @@ Tab.prototype = {
     this.browser.removeEventListener("TabPreZombify", this, true);
     this.browser.removeEventListener("DOMServiceWorkerFocusClient", this, true);
 
     this.browser.removeEventListener("PluginBindingAttached", this, true, true);
     this.browser.removeEventListener("VideoBindingAttached", this, true, true);
     this.browser.removeEventListener("VideoBindingCast", this, true, true);
 
     Services.obs.removeObserver(this, "before-first-paint");
-    Services.obs.removeObserver(this, "media-playback", false);
-    Services.obs.removeObserver(this, "media-playback-resumed", false);
+    Services.obs.removeObserver(this, "media-playback");
+    Services.obs.removeObserver(this, "media-playback-resumed");
 
     // Make sure the previously selected panel remains selected. The selected panel of a deck is
     // not stable when panels are removed.
     let selectedPanel = BrowserApp.deck.selectedPanel;
     BrowserApp.deck.removeChild(this.browser);
     BrowserApp.deck.selectedPanel = selectedPanel;
 
     this.browser = null;
--- a/services/cloudsync/CloudSyncAdapters.jsm
+++ b/services/cloudsync/CloudSyncAdapters.jsm
@@ -13,17 +13,17 @@ this.Adapters = function () {
   let eventTypes = [
     "sync",
   ];
 
   let suspended = true;
 
   let suspend = function () {
     if (!suspended) {
-      Services.obs.removeObserver(observer, "cloudsync:user-sync", false);
+      Services.obs.removeObserver(observer, "cloudsync:user-sync");
       suspended = true;
     }
   }.bind(this);
 
   let resume = function () {
     if (suspended) {
       Services.obs.addObserver(observer, "cloudsync:user-sync", false);
       suspended = false;
--- a/testing/mochitest/tests/SimpleTest/EventUtils.js
+++ b/testing/mochitest/tests/SimpleTest/EventUtils.js
@@ -608,17 +608,17 @@ function sendWheelAndPaint(aTarget, aOff
       utils.advanceTimeAndRefresh(1000);
 
       if (!aCallback) {
         utils.advanceTimeAndRefresh(0);
         return;
       }
 
       var waitForPaints = function () {
-        SpecialPowers.Services.obs.removeObserver(waitForPaints, "apz-repaints-flushed", false);
+        SpecialPowers.Services.obs.removeObserver(waitForPaints, "apz-repaints-flushed");
         aWindow.waitForAllPaintsFlushed(function() {
           utils.restoreNormalRefresh();
           aCallback();
         });
       }
 
       SpecialPowers.Services.obs.addObserver(waitForPaints, "apz-repaints-flushed", false);
       if (!utils.flushApzRepaints(aWindow)) {
--- a/testing/talos/talos/pageloader/chrome/memory.js
+++ b/testing/talos/talos/pageloader/chrome/memory.js
@@ -14,17 +14,17 @@ function initializeMemoryCollector(callb
 
     os.addObserver(function () {
         var os = Components.classes["@mozilla.org/observer-service;1"].
             getService(Components.interfaces.nsIObserverService);
 
         memTimer.cancel();
         memTimer = null;
 
-        os.removeObserver(arguments.callee, "child-memory-reporter-update", false);
+        os.removeObserver(arguments.callee, "child-memory-reporter-update");
         os.addObserver(collectAndReport, "child-memory-reporter-update", false);
         gMemCallback();
     }, "child-memory-reporter-update", false);
 
    /*
     * Assume we have a child process, but if timer fires before we call the observer
     * we will assume there is no child process.
     */
--- a/testing/talos/talos/talos-powers/components/TalosPowersService.js
+++ b/testing/talos/talos/talos-powers/components/TalosPowersService.js
@@ -41,17 +41,17 @@ TalosPowersService.prototype = {
     Services.mm.addMessageListener("TalosContentProfiler:Command", this);
     Services.mm.addMessageListener("TalosPowersContent:ForceCCAndGC", this);
     Services.mm.addMessageListener("TalosPowersContent:GetStartupInfo", this);
     Services.mm.addMessageListener("TalosPowers:ParentExec:QueryMsg", this);
     Services.obs.addObserver(this, "xpcom-shutdown", false);
   },
 
   uninit() {
-    Services.obs.removeObserver(this, "xpcom-shutdown", false);
+    Services.obs.removeObserver(this, "xpcom-shutdown");
   },
 
   receiveMessage(message) {
     switch(message.name) {
       case "Talos:ForceQuit": {
         this.forceQuit(message.data);
         break;
       }
--- a/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_observers.js
+++ b/toolkit/components/passwordmgr/test/browser/browser_passwordmgr_observers.js
@@ -115,17 +115,17 @@ add_task(function* test() {
         loginOrder = getLoginOrder();
         Services.logins.removeLogin(modifiedLogin);
         break;
       case 8: // remove all logins
         Services.logins.removeAllLogins();
         break;
       case 9: // finish
         Services.obs.removeObserver(
-          testObserver, "passwordmgr-dialog-updated", false);
+          testObserver, "passwordmgr-dialog-updated");
         pmDialog.close();
         resolve();
         break;
     }
   }
 
   });
 });
--- a/toolkit/components/reader/AboutReader.jsm
+++ b/toolkit/components/reader/AboutReader.jsm
@@ -285,17 +285,17 @@ AboutReader.prototype = {
     }
   },
 
   observe(subject, topic, data) {
     if (subject.QueryInterface(Ci.nsISupportsPRUint64).data != this._innerWindowId) {
       return;
     }
 
-    Services.obs.removeObserver(this, "inner-window-destroyed", false);
+    Services.obs.removeObserver(this, "inner-window-destroyed");
 
     this._mm.removeMessageListener("Reader:CloseDropdown", this);
     this._mm.removeMessageListener("Reader:AddButton", this);
     this._mm.removeMessageListener("Reader:RemoveButton", this);
     this._windowUnloaded = true;
   },
 
   _onReaderClose() {
--- a/toolkit/components/satchel/test/unit/test_notify.js
+++ b/toolkit/components/satchel/test/unit/test_notify.js
@@ -142,16 +142,16 @@ yield FormHistory.update({ op: "remove",
                          { handleCompletion(reason) { if (!reason) next_test() },
                            handleErrors(error) {
                              do_throw("Error occurred updating form history: " + error);
                            }
                          });
 
 do_check_eq(expectedNotification, null);
 
-os.removeObserver(TestObserver, "satchel-storage-changed", false);
+os.removeObserver(TestObserver, "satchel-storage-changed");
 
 do_test_finished();
 
 } catch (e) {
     throw "FAILED in test #" + testnum + " -- " + testdesc + ": " + e;
 }
 }
--- a/toolkit/components/search/tests/xpcshell/test_engineUpdate.js
+++ b/toolkit/components/search/tests/xpcshell/test_engineUpdate.js
@@ -32,17 +32,17 @@ add_task(function* test_engineUpdate() {
 
   yield new Promise(resolve => {
     Services.obs.addObserver(function obs(subject, topic, data) {
       if (data == "engine-loaded") {
         let loadedEngine = subject.QueryInterface(Ci.nsISearchEngine);
         let rawEngine = loadedEngine.wrappedJSObject;
         equal(loadedEngine.alias, KEYWORD, "Keyword not cleared by update");
         equal(rawEngine.getAttr("order"), 1, "Order not cleared by update");
-        Services.obs.removeObserver(obs, TOPIC, false);
+        Services.obs.removeObserver(obs, TOPIC);
         resolve();
       }
     }, TOPIC, false);
 
     // set last update to 8 days ago, since the default interval is 7, then
     // trigger an update
     engine.wrappedJSObject.setAttr("updateexpir", Date.now() - (ONE_DAY_IN_MS * 8));
     Services.search.QueryInterface(Components.interfaces.nsITimerCallback).notify(null);
--- a/toolkit/components/telemetry/TelemetrySession.jsm
+++ b/toolkit/components/telemetry/TelemetrySession.jsm
@@ -1777,17 +1777,17 @@ var Impl = {
       Services.obs.removeObserver(this, "sessionstore-windows-restored");
       this._hasWindowRestoredObserver = false;
     }
     if (this._hasXulWindowVisibleObserver) {
       Services.obs.removeObserver(this, "xul-window-visible");
       this._hasXulWindowVisibleObserver = false;
     }
     if (AppConstants.platform === "android") {
-      Services.obs.removeObserver(this, "application-background", false);
+      Services.obs.removeObserver(this, "application-background");
     }
     GCTelemetry.shutdown();
   },
 
   getPayload: function getPayload(reason, clearSubsession) {
     this._log.trace("getPayload - clearSubsession: " + clearSubsession);
     reason = reason || REASON_GATHER_PAYLOAD;
     // This function returns the current Telemetry payload to the caller.
--- a/toolkit/modules/addons/WebNavigation.jsm
+++ b/toolkit/modules/addons/WebNavigation.jsm
@@ -40,17 +40,17 @@ var Manager = {
     Services.mm.addMessageListener("Extension:DocumentChange", this);
     Services.mm.addMessageListener("Extension:HistoryChange", this);
 
     Services.mm.loadFrameScript("resource://gre/modules/WebNavigationContent.js", true);
   },
 
   uninit() {
     // Stop collecting recent tab transition data and reset the WeakMap.
-    Services.obs.removeObserver(this, "autocomplete-did-enter-text", true);
+    Services.obs.removeObserver(this, "autocomplete-did-enter-text");
     this.recentTabTransitionData = new WeakMap();
 
     Services.mm.removeMessageListener("Content:Click", this);
     Services.mm.removeMessageListener("Extension:StateChange", this);
     Services.mm.removeMessageListener("Extension:DocumentChange", this);
     Services.mm.removeMessageListener("Extension:HistoryChange", this);
     Services.mm.removeMessageListener("Extension:DOMContentLoaded", this);
 
--- a/toolkit/modules/addons/WebNavigationContent.js
+++ b/toolkit/modules/addons/WebNavigationContent.js
@@ -28,17 +28,17 @@ var FormSubmitListener = {
                                          Ci.nsIFormSubmitObserver,
                                          Ci.nsISupportsWeakReference]),
   init() {
     this.formSubmitWindows = new WeakSet();
     Services.obs.addObserver(FormSubmitListener, "earlyformsubmit", false);
   },
 
   uninit() {
-    Services.obs.removeObserver(FormSubmitListener, "earlyformsubmit", false);
+    Services.obs.removeObserver(FormSubmitListener, "earlyformsubmit");
     this.formSubmitWindows = new WeakSet();
   },
 
   notify: function(form, window, actionURI) {
     try {
       this.formSubmitWindows.add(window);
     } catch (e) {
       Cu.reportError("Error in FormSubmitListener.notify");
--- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
@@ -4394,17 +4394,17 @@ this.XPIProvider = {
    */
   observe(aSubject, aTopic, aData) {
     if (aTopic == NOTIFICATION_FLUSH_PERMISSIONS) {
       if (!aData || aData == XPI_PERMISSION) {
         this.importPermissions();
       }
       return;
     } else if (aTopic == NOTIFICATION_TOOLBOXPROCESS_LOADED) {
-      Services.obs.removeObserver(this, NOTIFICATION_TOOLBOXPROCESS_LOADED, false);
+      Services.obs.removeObserver(this, NOTIFICATION_TOOLBOXPROCESS_LOADED);
       this._toolboxProcessLoaded = true;
       BrowserToolboxProcess.on("connectionchange",
                                this.onDebugConnectionChange.bind(this));
     }
 
     if (aTopic == "nsPref:changed") {
       switch (aData) {
       case PREF_EM_MIN_COMPAT_APP_VERSION:
--- a/toolkit/mozapps/extensions/nsBlocklistServiceContent.js
+++ b/toolkit/mozapps/extensions/nsBlocklistServiceContent.js
@@ -32,17 +32,17 @@ Blocklist.prototype = {
 
   init() {
     Services.cpmm.addMessageListener("Blocklist:blocklistInvalidated", this);
     Services.obs.addObserver(this, "xpcom-shutdown", false);
   },
 
   uninit() {
     Services.cpmm.removeMessageListener("Blocklist:blocklistInvalidated", this);
-    Services.obs.removeObserver(this, "xpcom-shutdown", false);
+    Services.obs.removeObserver(this, "xpcom-shutdown");
   },
 
   observe(aSubject, aTopic, aData) {
     switch (aTopic) {
     case "xpcom-shutdown":
       this.uninit();
       break;
     }
--- a/tools/quitter/QuitterObserver.js
+++ b/tools/quitter/QuitterObserver.js
@@ -45,17 +45,17 @@ QuitterObserver.prototype = {
     var obs = Services.obs;
     obs.addObserver(this, "xpcom-shutdown", false);
     obs.addObserver(this, "chrome-document-global-created", false);
   },
 
   uninit: function()
   {
     var obs = Services.obs;
-    obs.removeObserver(this, "chrome-document-global-created", false);
+    obs.removeObserver(this, "chrome-document-global-created");
   },
 
   /**
    * messageManager callback function
    * This will get requests from our API in the window and process them in chrome for it
    **/
   receiveMessage: function(aMessage) {
     switch(aMessage.name) {