Bug 1092451 - Ensure waiting for frames button update before resolving toolbox.open. r=past

This commit is contained in:
Alexandre Poirot 2014-11-03 13:52:00 -05:00
Родитель b742dfdaf6
Коммит 6b6ec36950
1 изменённых файлов: 5 добавлений и 4 удалений

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

@ -268,7 +268,7 @@ Toolbox.prototype = {
let domReady = () => {
this.isReady = true;
this._listFrames();
let framesPromise = this._listFrames();
this.closeButton = this.doc.getElementById("toolbox-close");
this.closeButton.addEventListener("command", this.destroy, true);
@ -309,7 +309,8 @@ Toolbox.prototype = {
promise.all([
splitConsolePromise,
buttonsPromise
buttonsPromise,
framesPromise
]).then(() => {
this.emit("ready");
deferred.resolve();
@ -1229,13 +1230,13 @@ Toolbox.prototype = {
if (!this._target.form || !this._target.form.actor) {
// We are not targetting a regular TabActor
// it can be either an addon or browser toolbox actor
return;
return promise.resolve();
}
let packet = {
to: this._target.form.actor,
type: "listFrames"
};
this._target.client.request(packet, resp => {
return this._target.client.request(packet, resp => {
this._updateFrames(null, { frames: resp.frames });
});
},