Bug 1277910 - about:support should use nsIWindowMediator rather than nsIWindowWatcher r=felipe
authorJustin Dolske <dolske@mozilla.com>
Mon, 01 Aug 2016 15:52:08 -0700
changeset 333342 bdfe8fd853b927c7d4fc3a45237f4cd35e49e86c
parent 333341 3bc5415cc37d7c06e509cb49f5d4003481d49d15
child 333343 af62b45afe58e1e92e90b9df9c7c3f66f8bac60e
push id10033
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:50:26 +0000
treeherdermozilla-aurora@5dddbefdf759 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfelipe
bugs1277910
milestone50.0a1
Bug 1277910 - about:support should use nsIWindowMediator rather than nsIWindowWatcher r=felipe
toolkit/components/addoncompat/tests/addon/bootstrap.js
toolkit/components/addoncompat/tests/compat-addon/bootstrap.js
toolkit/modules/Troubleshoot.jsm
--- a/toolkit/components/addoncompat/tests/addon/bootstrap.js
+++ b/toolkit/components/addoncompat/tests/addon/bootstrap.js
@@ -10,22 +10,20 @@ Cu.import("resource://gre/modules/XPCOMU
 const baseURL = "http://mochi.test:8888/browser/" +
   "toolkit/components/addoncompat/tests/browser/";
 
 var contentSecManager = Cc["@mozilla.org/contentsecuritymanager;1"]
                           .getService(Ci.nsIContentSecurityManager);
 
 function forEachWindow(f)
 {
-  let wins = Services.ww.getWindowEnumerator("navigator:browser");
+  let wins = Services.wm.getEnumerator("navigator:browser");
   while (wins.hasMoreElements()) {
     let win = wins.getNext();
-    if (win.gBrowser) {
-      f(win);
-    }
+    f(win);
   }
 }
 
 function addLoadListener(target, listener)
 {
   target.addEventListener("load", function handler(event) {
     target.removeEventListener("load", handler, true);
     return listener(event);
--- a/toolkit/components/addoncompat/tests/compat-addon/bootstrap.js
+++ b/toolkit/components/addoncompat/tests/compat-addon/bootstrap.js
@@ -7,22 +7,20 @@ Cu.import("resource://gre/modules/Servic
 Cu.import("resource://gre/modules/BrowserUtils.jsm");
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 const baseURL = "http://mochi.test:8888/browser/" +
   "toolkit/components/addoncompat/tests/browser/";
 
 function forEachWindow(f)
 {
-  let wins = Services.ww.getWindowEnumerator("navigator:browser");
+  let wins = Services.wm.getEnumerator("navigator:browser");
   while (wins.hasMoreElements()) {
     let win = wins.getNext();
-    if (win.gBrowser) {
-      f(win);
-    }
+    f(win);
   }
 }
 
 function addLoadListener(target, listener)
 {
   function frameScript() {
     addEventListener("load", function handler(event) {
       removeEventListener("load", handler, true);
--- a/toolkit/modules/Troubleshoot.jsm
+++ b/toolkit/modules/Troubleshoot.jsm
@@ -204,17 +204,17 @@ var dataProviders = {
                        getService(Ci.nsIURLFormatter);
     try {
       data.supportURL = urlFormatter.formatURLPref("app.support.baseURL");
     }
     catch (e) {}
 
     data.numTotalWindows = 0;
     data.numRemoteWindows = 0;
-    let winEnumer = Services.ww.getWindowEnumerator("navigator:browser");
+    let winEnumer = Services.wm.getEnumerator("navigator:browser");
     while (winEnumer.hasMoreElements()) {
       data.numTotalWindows++;
       let remote = winEnumer.getNext().
                    QueryInterface(Ci.nsIInterfaceRequestor).
                    getInterface(Ci.nsIWebNavigation).
                    QueryInterface(Ci.nsILoadContext).
                    useRemoteTabs;
       if (remote) {