commit 40688473d8e993b71789a6b26a7e47c611d9fcf5
parent e3d0a455fcdca6ed975bf0c88fb80a75597e4538
Author: Andreas Farre <farre@mozilla.com>
Date: Tue, 4 Nov 2025 10:05:54 +0000
Bug 1997988 - Propagate origin attributes to beforeunload check. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D271193
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/docshell/shistory/nsSHistory.cpp b/docshell/shistory/nsSHistory.cpp
@@ -1509,7 +1509,8 @@ static bool MaybeCheckUnloadingIsCanceled(
}
nsCOMPtr<nsIPrincipal> targetPrincipal =
- BasePrincipal::CreateContentPrincipal(targetURI, OriginAttributes{});
+ BasePrincipal::CreateContentPrincipal(targetURI,
+ traversable->OriginAttributesRef());
// More of step 4.3
if (!windowGlobalParent->DocumentPrincipal()->Equals(targetPrincipal)) {