Port bug 1627707 - Rename LoadInfo::LoadingPrincipal to GetLoadingPrincipal as it can return null. rs=bustage-fix
authorGeoff Lankow <geoff@darktrojan.net>
Tue, 07 Apr 2020 17:30:20 +1200
changeset 38733 c5ff52454b8e9360e42b0bb651c1222a7ff9532f
parent 38732 2075434642ad796bb567cca4376d3e7aaefec022
child 38734 177fcd5c42fc5e692b1334da174d82fd509bef12
push id401
push userclokep@gmail.com
push dateMon, 01 Jun 2020 20:41:59 +0000
reviewersbustage-fix
bugs1627707
Port bug 1627707 - Rename LoadInfo::LoadingPrincipal to GetLoadingPrincipal as it can return null. rs=bustage-fix
mailnews/base/src/nsMsgContentPolicy.cpp
--- a/mailnews/base/src/nsMsgContentPolicy.cpp
+++ b/mailnews/base/src/nsMsgContentPolicy.cpp
@@ -144,17 +144,17 @@ nsMsgContentPolicy::ShouldLoad(nsIURI *a
   nsresult rv = NS_OK;
   uint32_t aContentType = aLoadInfo->GetExternalContentPolicyType();
   nsCOMPtr<nsISupports> aRequestingContext;
   if (aContentType == nsIContentPolicy::TYPE_DOCUMENT)
     aRequestingContext = aLoadInfo->ContextForTopLevelLoad();
   else
     aRequestingContext = aLoadInfo->LoadingNode();
   nsCOMPtr<nsIPrincipal> aRequestPrincipal = aLoadInfo->TriggeringPrincipal();
-  nsCOMPtr<nsIPrincipal> loadingPrincipal = aLoadInfo->LoadingPrincipal();
+  nsCOMPtr<nsIPrincipal> loadingPrincipal = aLoadInfo->GetLoadingPrincipal();
   nsCOMPtr<nsIURI> aRequestingLocation;
   if (loadingPrincipal) {
     loadingPrincipal->GetURI(getter_AddRefs(aRequestingLocation));
   }
 
   // The default decision at the start of the function is to accept the load.
   // Once we have checked the content type and the requesting location, then
   // we switch it to reject.