Bug 1627707 - Rename LoadInfo::LoadingPrincipal to GetLoadingPrincipal as it can return null. r=ckerschb

Mostly a matter of:

  rg -l '\->LoadingPrincipal' | xargs sed -i 's/->LoadingPrincipal/->GetLoadingPrincipal/g'

And then clang-format. But I tweaked manually nsHttpChannelAuthProvider (move
the variable where it's used, don't take a useless strong ref),
AddonContentPolicy (move the declaration of the variable to the if condition),
and BackgroundUtils (same).

Differential Revision: https://phabricator.services.mozilla.com/D69828
This commit is contained in:
Emilio Cobos Álvarez
2020-04-06 18:57:36 +00:00
parent c2269278d7
commit 46f64ba715
33 changed files with 80 additions and 68 deletions

View File

@@ -11162,9 +11162,9 @@ nsresult nsDocShell::AddToSessionHistory(
// For now keep storing just the principal in the SHEntry.
if (!principalToInherit) {
if (loadInfo->GetLoadingSandboxed()) {
if (loadInfo->LoadingPrincipal()) {
if (loadInfo->GetLoadingPrincipal()) {
principalToInherit = NullPrincipal::CreateWithInheritedAttributes(
loadInfo->LoadingPrincipal());
loadInfo->GetLoadingPrincipal());
} else {
// get the OriginAttributes
OriginAttributes attrs;