fuck this shit bro (add tabs.onReplaced notification)

This commit is contained in:
wuggy 2026-09-19 04:40:20 -07:00
commit 5ac0d5acc3
6 changed files with 108 additions and 7 deletions

View file

@ -76,7 +76,11 @@ RemoteMediator.prototype = {
let callbackID = this._addCallback(callback, installs.uris);
installs.mimetype = XPINSTALL_MIMETYPE;
installs.triggeringPrincipal = principal;
// nsIPrincipal is an XPCOM object and cannot cross the legacy message
// manager boundary used by content processes. Serialize it explicitly.
installs.triggeringPrincipal = Cc["@mozilla.org/network/serialization-helper;1"]
.getService(Ci.nsISerializationHelper)
.serializeToString(principal);
installs.callbackID = callbackID;
if (Services.appinfo.processType == Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT) {