Backed out changeset bdec8ddab580 (bug 1418522) for eslint failure at toolkit/content/aboutwebrtc/aboutWebrtc.js:756:37 | Extra space after computed key 'cand.type'. r=backout on a CLOSED TREE

This commit is contained in:
Sebastian Hengst 2017-11-20 20:35:26 +02:00
Родитель b2e912c5ab
Коммит bd79ca1aa9
1 изменённых файлов: 12 добавлений и 8 удалений

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

@ -665,8 +665,8 @@ ICEStats.prototype = {
let tbody = []; let tbody = [];
for (let stat of this.generateICEStats()) { for (let stat of this.generateICEStats()) {
tbody.push([ tbody.push([
stat["local-candidate"] || "", stat.localcandidate || "",
stat["remote-candidate"] || "", stat.remotecandidate || "",
stat.state || "", stat.state || "",
stat.priority || "", stat.priority || "",
stat.nominated || "", stat.nominated || "",
@ -733,7 +733,7 @@ ICEStats.prototype = {
if (local) { if (local) {
stat = { stat = {
["local-candidate"]: this.candidateToString(local), localcandidate: this.candidateToString(local),
state: pair.state, state: pair.state,
priority: pair.priority, priority: pair.priority,
nominated: pair.nominated, nominated: pair.nominated,
@ -744,17 +744,21 @@ ICEStats.prototype = {
matched[local.id] = true; matched[local.id] = true;
if (remote) { if (remote) {
stat["remote-candidate"] = this.candidateToString(remote); stat.remotecandidate = this.candidateToString(remote);
matched[remote.id] = true; matched[remote.id] = true;
} }
stats.push(stat); stats.push(stat);
} }
} }
// add the unmatched candidates to the end of the table for (let c of candidates.values()) {
[...candidates.values()].filter(cand => !matched[cand.id]).forEach( if (matched[c.id])
cand => stats.push({[cand.type] : this.candidateToString(cand)}) continue;
);
stat = {};
stat[c.type] = this.candidateToString(c);
stats.push(stat);
}
return stats.sort((a, b) => (b.priority || 0) - (a.priority || 0)); return stats.sort((a, b) => (b.priority || 0) - (a.priority || 0));
}, },