Bug 994712 - fix CART regression caused by switch to Promise.jsm for Task.jsm. r=mconley.

This commit is contained in:
Gijs Kruitbosch 2014-04-25 14:49:28 +02:00
parent 75c1542063
commit c679545d92
2 changed files with 9 additions and 2 deletions

View File

@ -200,6 +200,10 @@ const PanelUI = {
}
},
isReady: function() {
return !!this._isReady;
},
/**
* Registering the menu panel is done lazily for performance reasons. This
* method is exposed so that CustomizationMode can force panel-readyness in the
@ -263,6 +267,7 @@ const PanelUI = {
}
this._updateQuitTooltip();
this.panel.hidden = false;
this._isReady = true;
}.bind(this)).then(null, Cu.reportError);
return this._readyPromise;

View File

@ -188,10 +188,12 @@ CustomizeMode.prototype = {
// The menu panel is lazy, and registers itself when the popup shows. We
// need to force the menu panel to register itself, or else customization
// is really not going to work. We pass "true" to ensureRegistered to
// is really not going to work. We pass "true" to ensureReady to
// indicate that we're handling calling startBatchUpdate and
// endBatchUpdate.
yield window.PanelUI.ensureReady(true);
if (!window.PanelUI.isReady()) {
yield window.PanelUI.ensureReady(true);
}
// Hide the palette before starting the transition for increased perf.
this.visiblePalette.hidden = true;