Bug 1425542 - Move inspectObjectActor away from jsterm; r=bgrins.

Differential Revision: https://phabricator.services.mozilla.com/D8519

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Nicolas Chevobbe 2018-10-15 14:23:51 +00:00
parent 95a682c9a9
commit bcd61b77db
3 changed files with 12 additions and 14 deletions

View File

@ -2757,9 +2757,7 @@ Toolbox.prototype = {
// when the objectActor doesn't represent an undefined or null value.
await this.openSplitConsole();
const panel = this.getPanel("webconsole");
const jsterm = panel.hud.jsterm;
jsterm.inspectObjectActor(objectActor);
panel.hud.ui.inspectObjectActor(objectActor);
}
},

View File

@ -475,7 +475,7 @@ class JSTerm extends Component {
this.props.clearHistory();
break;
case "inspectObject":
this.inspectObjectActor(helperResult.object);
this.hud.inspectObjectActor(helperResult.object);
break;
case "error":
try {
@ -513,16 +513,6 @@ class JSTerm extends Component {
return null;
}
inspectObjectActor(objectActor) {
this.hud.consoleOutput.dispatchMessageAdd({
helperResult: {
type: "inspectObject",
object: objectActor
}
}, true);
return this.hud.consoleOutput;
}
screenshotNotify(results) {
const wrappedResults = results.map(message => ({ message, type: "logMessage" }));
this.hud.consoleOutput.dispatchMessagesAdd(wrappedResults);

View File

@ -155,6 +155,16 @@ WebConsoleFrame.prototype = {
}
},
inspectObjectActor(objectActor) {
this.consoleOutput.dispatchMessageAdd({
helperResult: {
type: "inspectObject",
object: objectActor
}
}, true);
return this.consoleOutput;
},
_onUpdateListeners() {
},