mirror of
https://github.com/roytam1/basilisk55.git
synced 2026-05-26 15:02:46 +00:00
cherry-picked mozilla upstream changes:
bug1416307, bug1434384, bug1442504, bug1426603, bug1440717, bug1443891, bug1361699, bug1433609, bug1444231, bug1409440, bug1441941, bug1443092, bug1448774, bug1448705, bug1449548, bug1388020, bug1451376, bug1393367, bug1453339, bug1452202
This commit is contained in:
@@ -6783,9 +6783,17 @@ nsDocShell::ForceRefreshURI(nsIURI* aURI, int32_t aDelay, bool aMetaRefresh, nsI
|
||||
*/
|
||||
loadInfo->SetReferrer(mCurrentURI);
|
||||
|
||||
/* Don't ever "guess" on which principal to use to avoid picking
|
||||
* the current principal.
|
||||
*/
|
||||
// Set the triggering pricipal to aPrincipal if available, or current
|
||||
// document's principal otherwise.
|
||||
nsCOMPtr<nsIPrincipal> principal = aPrincipal;
|
||||
if (!principal) {
|
||||
nsCOMPtr<nsIDocument> doc = GetDocument();
|
||||
if (!doc) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
principal = doc->NodePrincipal();
|
||||
}
|
||||
loadInfo->SetTriggeringPrincipal(principal);
|
||||
loadInfo->SetPrincipalIsExplicit(true);
|
||||
|
||||
/* Check if this META refresh causes a redirection
|
||||
@@ -6813,13 +6821,6 @@ nsDocShell::ForceRefreshURI(nsIURI* aURI, int32_t aDelay, bool aMetaRefresh, nsI
|
||||
loadInfo->SetLoadType(nsIDocShellLoadInfo::loadRefresh);
|
||||
}
|
||||
|
||||
// If the principal is null, the refresh will have a triggeringPrincipal
|
||||
// derived from the referrer URI, or will be set to the system principal
|
||||
// if there is no refererrer. See LoadURI()
|
||||
if (aPrincipal) {
|
||||
loadInfo->SetTriggeringPrincipal(aPrincipal);
|
||||
}
|
||||
|
||||
/*
|
||||
* LoadURI(...) will cancel all refresh timers... This causes the
|
||||
* Timer and its refreshData instance to be released...
|
||||
|
||||
Reference in New Issue
Block a user