Backed out changeset 69a5a04f2906 (bug 1466899) for ESlint failure at services/sync/tps/extensions/tps/resource/modules/tabs.jsm on a CLOSED TREE
authorCoroiu Cristina <ccoroiu@mozilla.com>
Wed, 20 Jun 2018 05:36:39 +0300
changeset 423079 b6f1b6284f474a08953cd3b58709c14c5cd5e684
parent 423078 86c39d3d96f91334345398c2f3d74193a09e3d66
child 423087 681eb7dfa324dd50403c382888929ea8b8b11b00
child 423149 e7d6ae2adfe21485357b3254e05157f58766420d
push id65342
push userapavel@mozilla.com
push dateWed, 20 Jun 2018 11:30:38 +0000
treeherderautoland@dadc58a65c2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1466899
milestone62.0a1
backs out69a5a04f2906883ff00d05b80d966859a65b9f4b
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
Backed out changeset 69a5a04f2906 (bug 1466899) for ESlint failure at services/sync/tps/extensions/tps/resource/modules/tabs.jsm on a CLOSED TREE
services/sync/tps/extensions/tps/resource/modules/tabs.jsm
--- a/services/sync/tps/extensions/tps/resource/modules/tabs.jsm
+++ b/services/sync/tps/extensions/tps/resource/modules/tabs.jsm
@@ -65,26 +65,25 @@ var BrowserTabs = {
    *
    * @param uri The uri of the tab to find
    * @param title The page title of the tab to find
    * @param profile The profile to search for tabs
    * @return true if the specified tab could be found, otherwise false
    */
   Find(uri, title, profile) {
     // Find the uri in Weave's list of tabs for the given profile.
-    let tabEngine = Weave.Service.engineManager.get("tabs");
-    for (let client of Weave.Service.clientsEngine.remoteClients) {
-      let tabClient = tabEngine.getClientById(client.id)
-      if (!tabClient || !tabClient.tabs) {
+    let engine = Weave.Service.engineManager.get("tabs");
+    for (let [, client] of Object.entries(engine.getAllClients())) {
+      if (!client.tabs) {
         continue;
       }
-      for (let key in tabClient.tabs) {
-        let tab = tabClient.tabs[key];
+      for (let key in client.tabs) {
+        let tab = client.tabs[key];
         let weaveTabUrl = tab.urlHistory[0];
-        if (uri == weaveTabUrl && profile == client.name)
+        if (uri == weaveTabUrl && profile == client.clientName)
           if (title == undefined || title == tab.title)
             return true;
         }
         Logger.logInfo(`Dumping tabs for ${client.clientName}...\n` + JSON.stringify(client.tabs));
       }
     return false;
   },
 };