mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 07:48:38 +09:00
Bug 1348801: Teach TriggeringPrincipal about OA when opening link in private window
This commit is contained in:
parent
5f39398ab7
commit
f99258328c
1 changed files with 13 additions and 0 deletions
|
|
@ -259,6 +259,19 @@ function openLinkIn(url, where, params) {
|
|||
return;
|
||||
}
|
||||
|
||||
// Teach the principal about the right OA to use, e.g. in case when
|
||||
// opening a link in a new private window, or in a new container tab.
|
||||
// Please note we do not have to do that for SystemPrincipals and we
|
||||
// can not do it for NullPrincipals since NullPrincipals are only
|
||||
// identical if they actually are the same object (See Bug: 1346759)
|
||||
if (aPrincipal && aPrincipal.isCodebasePrincipal) {
|
||||
let attrs = {
|
||||
userContextId: aUserContextId,
|
||||
privateBrowsingId: aIsPrivate || (w && PrivateBrowsingUtils.isWindowPrivate(w)),
|
||||
};
|
||||
aPrincipal = Services.scriptSecurityManager.createCodebasePrincipal(aPrincipal.URI, attrs);
|
||||
}
|
||||
|
||||
if (!w || where == "window") {
|
||||
// Strip referrer data when opening a new private window, to prevent
|
||||
// regular browsing data from leaking into it.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue