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