зеркало из https://github.com/mozilla/gecko-dev.git
Bug 994844 - Remove Task.spawn() usage from CustomizeMode.populatePalette() r=mconley
This commit is contained in:
Родитель
4b94d9aec4
Коммит
06e129d0fd
|
@ -234,7 +234,7 @@ CustomizeMode.prototype = {
|
|||
this._showPanelCustomizationPlaceholders();
|
||||
|
||||
yield this._wrapToolbarItems();
|
||||
yield this.populatePalette();
|
||||
this.populatePalette();
|
||||
|
||||
this.visiblePalette.addEventListener("dragstart", this, true);
|
||||
this.visiblePalette.addEventListener("dragover", this, true);
|
||||
|
@ -647,7 +647,7 @@ CustomizeMode.prototype = {
|
|||
let fragment = this.document.createDocumentFragment();
|
||||
let toolboxPalette = this.window.gNavToolbox.palette;
|
||||
|
||||
return Task.spawn(function() {
|
||||
try {
|
||||
let unusedWidgets = CustomizableUI.getUnusedWidgets(toolboxPalette);
|
||||
for (let widget of unusedWidgets) {
|
||||
let paletteItem = this.makePaletteItem(widget, "palette");
|
||||
|
@ -657,7 +657,9 @@ CustomizeMode.prototype = {
|
|||
this.visiblePalette.appendChild(fragment);
|
||||
this._stowedPalette = this.window.gNavToolbox.palette;
|
||||
this.window.gNavToolbox.palette = this.visiblePalette;
|
||||
}.bind(this)).then(null, ERROR);
|
||||
} catch (ex) {
|
||||
ERROR(ex);
|
||||
}
|
||||
},
|
||||
|
||||
//XXXunf Maybe this should use -moz-element instead of wrapping the node?
|
||||
|
@ -985,7 +987,7 @@ CustomizeMode.prototype = {
|
|||
CustomizableUI.reset();
|
||||
|
||||
yield this._wrapToolbarItems();
|
||||
yield this.populatePalette();
|
||||
this.populatePalette();
|
||||
|
||||
this.persistCurrentSets(true);
|
||||
|
||||
|
@ -1011,7 +1013,7 @@ CustomizeMode.prototype = {
|
|||
CustomizableUI.undoReset();
|
||||
|
||||
yield this._wrapToolbarItems();
|
||||
yield this.populatePalette();
|
||||
this.populatePalette();
|
||||
|
||||
this.persistCurrentSets(true);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче