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); }