Bug 1343678 - Use window context for GeckoSessionTestRule.evaluateJS() r=geckoview-reviewers,droeh

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
James Willcox 2019-08-12 18:35:13 +00:00
parent a427ad0aa8
commit cd0bf6a265

View File

@ -12,7 +12,7 @@ window.addEventListener("pageshow", () => {
try {
// Using eval here is the whole point of this WebExtension so we can
// safely ignore the eslint warning.
const response = eval(message.eval); // eslint-disable-line no-eval
const response = window.eval(message.eval); // eslint-disable-line no-eval
sendResponse(message.id, response);
} catch (ex) {
sendSyncResponse(message.id, null, ex);