Bug 1580848 - Add ContentTaskUtils to SpecialPowers.spawn execution scope. r=kmag

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mike Conley 2019-09-13 09:13:06 +00:00
Родитель 46be6f9ea3
Коммит 8c8031be61
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -55,12 +55,16 @@ ChromeUtils.defineModuleGetter(
"AppConstants",
"resource://gre/modules/AppConstants.jsm"
);
ChromeUtils.defineModuleGetter(
this,
"PerTestCoverageUtils",
"resource://testing-common/PerTestCoverageUtils.jsm"
);
ChromeUtils.defineModuleGetter(
this,
"ContentTaskUtils",
"resource://testing-common/ContentTaskUtils.jsm"
);
// Allow stuff from this scope to be accessed from non-privileged scopes. This
// would crash if used outside of automation.
@ -1676,6 +1680,7 @@ class SpecialPowersChild extends JSWindowActorChild {
});
sb.sandbox.SpecialPowers = this;
sb.sandbox.ContentTaskUtils = ContentTaskUtils;
Object.defineProperty(sb.sandbox, "content", {
get: () => {
return this.contentWindow;