diff options
Diffstat (limited to 'services/sync/tps/extensions/tps/resource/modules/tabs.jsm')
-rw-r--r-- | services/sync/tps/extensions/tps/resource/modules/tabs.jsm | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/services/sync/tps/extensions/tps/resource/modules/tabs.jsm b/services/sync/tps/extensions/tps/resource/modules/tabs.jsm index af983573f..a2ce1afc1 100644 --- a/services/sync/tps/extensions/tps/resource/modules/tabs.jsm +++ b/services/sync/tps/extensions/tps/resource/modules/tabs.jsm @@ -13,7 +13,7 @@ const {classes: Cc, interfaces: Ci, utils: Cu} = Components; Cu.import("resource://services-sync/main.js"); -var BrowserTabs = { +let BrowserTabs = { /** * Add * @@ -49,12 +49,8 @@ var BrowserTabs = { Find: function(uri, title, profile) { // Find the uri in Weave's list of tabs for the given profile. let engine = Weave.Service.engineManager.get("tabs"); - for (let [guid, client] of Object.entries(engine.getAllClients())) { - if (!client.tabs) { - continue; - } - for (let key in client.tabs) { - let tab = client.tabs[key]; + for (let [guid, client] in Iterator(engine.getAllClients())) { + for each (tab in client.tabs) { let weaveTabUrl = tab.urlHistory[0]; if (uri == weaveTabUrl && profile == client.clientName) if (title == undefined || title == tab.title) |