Bug 1566850 - Remove target.activeConsole usage in DOM panel. r=ochameau.

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Nicolas Chevobbe 2019-12-13 09:09:01 +00:00
parent dc772fcaf3
commit 1df3816fb1
2 changed files with 5 additions and 5 deletions

View File

@ -182,9 +182,8 @@ DomPanel.prototype = {
getRootGrip: async function() {
// Attach Console. It might involve RDP communication, so wait
// asynchronously for the result
const { result } = await this.target.activeConsole.evaluateJSAsync(
"window"
);
const consoleFront = await this.target.getFront("console");
const { result } = await consoleFront.evaluateJSAsync("window");
return result;
},

View File

@ -188,8 +188,9 @@ function expandRow(panel, labelText) {
});
}
function evaluateJSAsync(panel, expression) {
return panel.target.activeConsole.evaluateJSAsync(expression);
async function evaluateJSAsync(panel, expression) {
const consoleFront = await panel.target.getFront("console");
return consoleFront.evaluateJSAsync(expression);
}
function refreshPanel(panel) {