Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
2024-11-21 21:09:29 +08:00
177 changed files with 515 additions and 4889 deletions
-1
View File
@@ -24,7 +24,6 @@
"desktop-notification":{},
"idle":{},
"network-events":{},
"embed-apps":{},
"audio-channel-content":{},
"audio-channel-alarm":{},
"before-after-keyboard-event":{}
@@ -87,7 +87,6 @@ SpecialPowersObserver.prototype._loadFrameScript = function()
this._messageManager.addMessageListener("SPUnloadExtension", this);
this._messageManager.addMessageListener("SPExtensionMessage", this);
this._messageManager.addMessageListener("SPCleanUpSTSData", this);
this._messageManager.addMessageListener("SPClearAppPrivateData", this);
this._messageManager.loadFrameScript(CHILD_LOGGER_SCRIPT, true);
this._messageManager.loadFrameScript(CHILD_SCRIPT_API, true);
@@ -159,7 +158,6 @@ SpecialPowersObserver.prototype.uninit = function()
this._messageManager.removeMessageListener("SPUnloadExtension", this);
this._messageManager.removeMessageListener("SPExtensionMessage", this);
this._messageManager.removeMessageListener("SPCleanUpSTSData", this);
this._messageManager.removeMessageListener("SPClearAppPrivateData", this);
this._messageManager.removeDelayedFrameScript(CHILD_LOGGER_SCRIPT);
this._messageManager.removeDelayedFrameScript(CHILD_SCRIPT_API);
@@ -601,28 +601,6 @@ SpecialPowersObserverAPI.prototype = {
return undefined;
}
case "SPClearAppPrivateData": {
let appId = aMessage.data.appId;
let browserOnly = aMessage.data.browserOnly;
let attributes = { appId: appId };
if (browserOnly) {
attributes.inIsolatedMozBrowser = true;
}
this._notifyCategoryAndObservers(null,
"clear-origin-attributes-data",
JSON.stringify(attributes));
let subject = {
appId: appId,
browserOnly: browserOnly,
QueryInterface: XPCOMUtils.generateQI([Ci.mozIApplicationClearPrivateDataParams])
};
this._notifyCategoryAndObservers(subject, "webapps-clear-data", null);
return undefined;
}
default:
throw new SpecialPowersError("Unrecognized Special Powers API");
}
@@ -44,8 +44,7 @@ function SpecialPowers(window) {
"SPLoadExtension",
"SPStartupExtension",
"SPUnloadExtension",
"SPExtensionMessage",
"SPClearAppPrivateData"];
"SPExtensionMessage"];
addMessageListener("SPPingService", this._messageListener);
addMessageListener("SpecialPowers.FilesCreated", this._messageListener);
addMessageListener("SpecialPowers.FilesError", this._messageListener);
@@ -1766,16 +1766,6 @@ SpecialPowersAPI.prototype = {
// It's an URL.
let uri = Services.io.newURI(arg, null, null);
principal = secMan.createCodebasePrincipal(uri, {});
} else if (arg.manifestURL) {
// It's a thing representing an app.
let appsSvc = Cc["@mozilla.org/AppsService;1"]
.getService(Ci.nsIAppsService)
let app = appsSvc.getAppByManifestURL(arg.manifestURL);
if (!app) {
throw "No app for this manifest!";
}
principal = app.principal;
} else if (arg.nodePrincipal) {
// It's a document.
// In some tests the arg is a wrapped DOM element, so we unwrap it first.