Backed out changeset 69a5a04f2906 (bug 1466899) for ESlint failure at services/sync/tps/extensions/tps/resource/modules/tabs.jsm on a CLOSED TREE

This commit is contained in:
Coroiu Cristina 2018-06-20 05:36:39 +03:00
Родитель 106238d1d1
Коммит 66390fdc8b
1 изменённых файлов: 6 добавлений и 7 удалений

Просмотреть файл

@ -70,16 +70,15 @@ var BrowserTabs = {
*/
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;
}