зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1148893 - Replace .then handlers with yields to catch 'Unknown sheet source' rejections in Style Editor onShow task. r=ejpbruel
This commit is contained in:
Родитель
63f9ca53ff
Коммит
cd332ecd32
|
@ -550,13 +550,14 @@ StyleEditorUI.prototype = {
|
|||
this.emit("editor-selected", editor);
|
||||
|
||||
// Is there any CSS coverage markup to include?
|
||||
csscoverage.getUsage(this._target).then(usage => {
|
||||
let usage = yield csscoverage.getUsage(this._target);
|
||||
if (usage == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
let href = csscoverage.sheetToUrl(editor.styleSheet);
|
||||
usage.createEditorReport(href).then(data => {
|
||||
let data = yield usage.createEditorReport(href)
|
||||
|
||||
editor.removeAllUnusedRegions();
|
||||
|
||||
if (data.reports.length > 0) {
|
||||
|
@ -572,8 +573,6 @@ StyleEditorUI.prototype = {
|
|||
this.emit("error", { key: "error-compressed", level: "info" });
|
||||
}
|
||||
}
|
||||
}, Cu.reportError);
|
||||
}, Cu.reportError);
|
||||
}.bind(this)).then(null, Cu.reportError);
|
||||
}.bind(this)
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче