зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1092451 - Ensure waiting for frames button update before resolving toolbox.open. r=past
This commit is contained in:
Родитель
b742dfdaf6
Коммит
6b6ec36950
|
@ -268,7 +268,7 @@ Toolbox.prototype = {
|
||||||
let domReady = () => {
|
let domReady = () => {
|
||||||
this.isReady = true;
|
this.isReady = true;
|
||||||
|
|
||||||
this._listFrames();
|
let framesPromise = this._listFrames();
|
||||||
|
|
||||||
this.closeButton = this.doc.getElementById("toolbox-close");
|
this.closeButton = this.doc.getElementById("toolbox-close");
|
||||||
this.closeButton.addEventListener("command", this.destroy, true);
|
this.closeButton.addEventListener("command", this.destroy, true);
|
||||||
|
@ -309,7 +309,8 @@ Toolbox.prototype = {
|
||||||
|
|
||||||
promise.all([
|
promise.all([
|
||||||
splitConsolePromise,
|
splitConsolePromise,
|
||||||
buttonsPromise
|
buttonsPromise,
|
||||||
|
framesPromise
|
||||||
]).then(() => {
|
]).then(() => {
|
||||||
this.emit("ready");
|
this.emit("ready");
|
||||||
deferred.resolve();
|
deferred.resolve();
|
||||||
|
@ -1229,13 +1230,13 @@ Toolbox.prototype = {
|
||||||
if (!this._target.form || !this._target.form.actor) {
|
if (!this._target.form || !this._target.form.actor) {
|
||||||
// We are not targetting a regular TabActor
|
// We are not targetting a regular TabActor
|
||||||
// it can be either an addon or browser toolbox actor
|
// it can be either an addon or browser toolbox actor
|
||||||
return;
|
return promise.resolve();
|
||||||
}
|
}
|
||||||
let packet = {
|
let packet = {
|
||||||
to: this._target.form.actor,
|
to: this._target.form.actor,
|
||||||
type: "listFrames"
|
type: "listFrames"
|
||||||
};
|
};
|
||||||
this._target.client.request(packet, resp => {
|
return this._target.client.request(packet, resp => {
|
||||||
this._updateFrames(null, { frames: resp.frames });
|
this._updateFrames(null, { frames: resp.frames });
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
Загрузка…
Ссылка в новой задаче