Bug 1601630 - Remove WebConsoleUI evaluateJSAsync. r=jlast.

This method was directly using the main target console front
to evaluate something, which could cause issue in a fission
world.
The function is moved to the WebConsole class, and calls commands
evaluateJSAsync, in which we retrieve the appropriate front
given the given options object (e.g. if there's a selecteObjectActor,
we'll talk to the target that hold the actor).

Differential Revision: https://phabricator.services.mozilla.com/D55986
This commit is contained in:
Nicolas Chevobbe
2019-12-06 08:29:20 +00:00
parent 19163d7fa3
commit 78ac5b16fd
5 changed files with 25 additions and 23 deletions

View File

@@ -371,7 +371,7 @@ class MarkupContextMenu {
const options = {
selectedNodeActor: this.selection.nodeFront.actorID,
};
const res = await hud.ui.evaluateJSAsync(evalString, options);
const res = await hud.evaluateJSAsync(evalString, options);
hud.setInputValue(res.result);
this.inspector.emit("console-var-ready");
}