mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-23 00:47:31 +09:00
fuck this shit bro (add tabs.onReplaced notification)
This commit is contained in:
parent
e5a431b519
commit
5ac0d5acc3
6 changed files with 108 additions and 7 deletions
|
|
@ -36,6 +36,20 @@ const CHILD_SCRIPT = "resource://gre/modules/addons/Content.js";
|
|||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
function deserializeTriggeringPrincipal(principal) {
|
||||
if (typeof principal != "string") {
|
||||
return principal;
|
||||
}
|
||||
try {
|
||||
return Cc["@mozilla.org/network/serialization-helper;1"]
|
||||
.getService(Ci.nsISerializationHelper)
|
||||
.deserializeObject(principal)
|
||||
.QueryInterface(Ci.nsIPrincipal);
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
var gSingleton = null;
|
||||
|
||||
function amManager() {
|
||||
|
|
@ -219,7 +233,7 @@ amManager.prototype = {
|
|||
}
|
||||
|
||||
return this.installAddonsFromWebpage(payload.mimetype,
|
||||
aMessage.target, payload.triggeringPrincipal, payload.uris,
|
||||
aMessage.target, deserializeTriggeringPrincipal(payload.triggeringPrincipal), payload.uris,
|
||||
payload.hashes, payload.names, payload.icons, callback);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue