This commit and commit message was mostly generated automatically by little_safefor.py. * Actors that had the annotation added: AllowJavascript, AppTestDelegate, BrowserTestUtils, Bug1622420, ColorPicker, ContentEventListener, ContentMeta, DampLoad, DateTimePicker, DocShellHelpers, ForceRefresh, FormAutofill, FullscreenFrame, Interactions, LayoutDebug, MarionetteCommands, MarionetteEvents, MarionetteReftest, PageData, PictureInPicture, PictureInPictureLauncher, PictureInPictureToggle, ReftestFission, Screenshot, Select, SpecialPowers, SpecialPowersProcessActor, StartupContentSubframe, TPSFxAAutofill, TalosTabSwitch, TestSupport, TestSupportProcess, TestWorkerWatcher, UserCharacteristicsWindowInfo, UserCharacteristicsCanvasRendering, WPTEvents, WebDriverDocumentInserted, WebDriverProcessData, WebDriverWorkerListener * Actors that were seen that shouldn't have the annotation: AboutNewTab, AboutTranslations, CodeMirrorTest, MigrationWizard, MozCachedOHTTP, UserCharacteristics Files that were skipped by the analysis: browser/extensions/newtab/lib/ExternalComponentsFeed.sys.mjs This one does something weird, but I think it only registers ASRouterNewTabMessage, which is non-web. devtools/server/actors/watcher/ParentProcessWatcherRegistry.sys.mjs This one does something weird so it is manually fixed separately. dom/chrome-webidl/JSProcessActor.webidl dom/chrome-webidl/JSWindowActor.webidl These two files define the register calls and aren't actually calling it. dom/ipc/tests/JSProcessActor/browser_registerProcessActor.js dom/ipc/tests/JSProcessActor/head.js dom/ipc/tests/JSWindowActor/browser_registerWindowActor.js dom/ipc/tests/JSWindowActor/head.js These four files do something weird and this is manually fixed up as part of the patch that adds the annotation. mobile/shared/modules/geckoview/GeckoViewActorManager.sys.mjs This file handles the mass-registration of actors and is dealt with by the other automated patch. This is also the case for most of the registrations in ActorManagerParent.sys.mjs, but we also fix up some of the individual registrations in this patch. Differential Revision: https://phabricator.services.mozilla.com/D304934
70 lines
2.0 KiB
JavaScript
70 lines
2.0 KiB
JavaScript
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
/* globals ExtensionAPI, Services, XPCOMUtils */
|
|
|
|
ChromeUtils.defineESModuleGetters(this, {
|
|
SpecialPowersParent: "resource://testing-common/SpecialPowersParent.sys.mjs",
|
|
});
|
|
|
|
XPCOMUtils.defineLazyServiceGetter(
|
|
this,
|
|
"resProto",
|
|
"@mozilla.org/network/protocol;1?name=resource",
|
|
Ci.nsISubstitutingProtocolHandler
|
|
);
|
|
|
|
this.specialpowers = class extends ExtensionAPI {
|
|
onStartup() {
|
|
// Register special testing modules.
|
|
let manifest = Services.dirsvc.get("ProfD", Ci.nsIFile);
|
|
manifest.append("tests.manifest");
|
|
Components.manager
|
|
.QueryInterface(Ci.nsIComponentRegistrar)
|
|
.autoRegister(manifest);
|
|
|
|
{
|
|
let uri = Services.io.newURI("content/", null, this.extension.rootURI);
|
|
resProto.setSubstitutionWithFlags(
|
|
"specialpowers",
|
|
uri,
|
|
resProto.ALLOW_CONTENT_ACCESS
|
|
);
|
|
}
|
|
|
|
if (!resProto.hasSubstitution("testing-common")) {
|
|
let uri = Services.io.newURI("modules/", null, this.extension.rootURI);
|
|
resProto.setSubstitution(
|
|
"testing-common",
|
|
uri,
|
|
resProto.ALLOW_CONTENT_ACCESS
|
|
);
|
|
}
|
|
|
|
SpecialPowersParent.registerActor();
|
|
|
|
ChromeUtils.registerWindowActor("AppTestDelegate", {
|
|
parent: {
|
|
esModuleURI: "resource://specialpowers/AppTestDelegateParent.sys.mjs",
|
|
},
|
|
child: {
|
|
esModuleURI: "resource://specialpowers/AppTestDelegateChild.sys.mjs",
|
|
events: {
|
|
DOMContentLoaded: { capture: true },
|
|
load: { capture: true },
|
|
},
|
|
},
|
|
allFrames: true,
|
|
includeChrome: true,
|
|
safeForUntrustedWebProcess: true,
|
|
});
|
|
}
|
|
|
|
onShutdown() {
|
|
SpecialPowersParent.unregisterActor();
|
|
ChromeUtils.unregisterWindowActor("AppTestDelegate");
|
|
resProto.setSubstitution("specialpowers", null);
|
|
}
|
|
};
|