Backed out changeset c30194bd49f9 (bug 1587227) for failing in browser_contextmenu_sendpage.js

This commit is contained in:
Noemi Erli 2019-10-09 04:04:46 +03:00
parent 9dc56a5bf5
commit ea6e0bc746

View File

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