Bug 1142114: Fix broken cases of devtools calling once. r=jsantell

This commit is contained in:
Dave Townsend 2015-03-11 10:00:25 -07:00
parent dc83906ac9
commit dc5ffb45a6
2 changed files with 5 additions and 4 deletions

View File

@ -32,7 +32,7 @@ add_task(function*() {
is($bypass.disabled, false, "Bypass button is not disabled for normal nodes");
command($bypass);
yield gAudioNodes.once("bypass");
yield once(gAudioNodes, "bypass");
is((yield actors[1].isBypassed()), true, "AudioNodeActor is bypassed.")
is($bypass.checked, false, "Button is 'off' when clicked");
@ -41,7 +41,7 @@ add_task(function*() {
"AudioNode has 'bypassed' class.");
command($bypass);
yield gAudioNodes.once("bypass");
yield once(gAudioNodes, "bypass");
is((yield actors[1].isBypassed()), false, "AudioNodeActor is no longer bypassed.")
is($bypass.checked, true, "Button is back on when clicked");

View File

@ -3209,9 +3209,10 @@ Widgets.ObjectRenderers.add({
let isAttached = yield this.toolbox.walker.isInDOMTree(this._nodeFront);
if (isAttached) {
let onReady = this.toolbox.inspector.once("inspector-updated");
let onReady = promise.defer();
this.toolbox.inspector.once("inspector-updated", onReady.resolve);
yield this.toolbox.selection.setNodeFront(this._nodeFront, "console");
yield onReady;
yield onReady.promise;
} else {
throw null;
}