From ea6e0bc74643c7b1d1a4171e9e30dc5bde72601e Mon Sep 17 00:00:00 2001 From: Noemi Erli Date: Wed, 9 Oct 2019 04:04:46 +0300 Subject: [PATCH] Backed out changeset c30194bd49f9 (bug 1587227) for failing in browser_contextmenu_sendpage.js --- browser/base/content/browser-sync.js | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/browser/base/content/browser-sync.js b/browser/base/content/browser-sync.js index 3cb945a246e7..1256f631a619 100644 --- a/browser/base/content/browser-sync.js +++ b/browser/base/content/browser-sync.js @@ -64,18 +64,6 @@ var gSync = { }, getSendTabTargets() { - // If sync is not enabled, then there's no point looking for sync clients. - // If sync is simply not ready or hasn't yet synced the clients engine, we - // just assume the fxa device doesn't have a sync record - in practice, - // that just means we don't attempt to fall back to the "old" sendtab should - // "new" sendtab fail. - // We should just kill "old" sendtab now all our mobile browsers support - // "new". - let getClientRecord = () => undefined; - if (UIState.get().syncEnabled && Weave.Service.clientsEngine) { - getClientRecord = id => - Weave.Service.clientsEngine.getClientByFxaDeviceId(id); - } let targets = []; if (!fxAccounts.device.recentDeviceList) { return targets; @@ -84,8 +72,9 @@ var gSync = { if (d.isCurrentDevice) { continue; } - - let clientRecord = getClientRecord(d.id); + let clientRecord = Weave.Service.clientsEngine.getClientByFxaDeviceId( + d.id + ); if (clientRecord || fxAccounts.commands.sendTab.isDeviceCompatible(d)) { targets.push({ clientRecord, @@ -944,7 +933,7 @@ var gSync = { } else { // For phones, FxA uses "mobile" and Sync clients uses "phone". type = target.type == "mobile" ? "phone" : target.type; - lastModified = new Date(target.lastAccessTime); + lastModified = null; } addTargetDevice(target.id, target.name, type, lastModified); }