mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-25 03:05:34 +00:00
Bug 1587604 - Check if loadingPrincipal is null before doing cross-origin check r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D48821 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
ab9ca2b438
commit
f167db7f11
@ -8107,6 +8107,11 @@ void nsHttpChannel::ReportContentTypeTelemetryForCrossOriginStylesheets() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mLoadInfo->LoadingPrincipal()) {
|
||||
// No loading principal to check if it's same-origin
|
||||
return;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIURI> docURI = mLoadInfo->LoadingPrincipal()->GetURI();
|
||||
nsIScriptSecurityManager* ssm = nsContentUtils::GetSecurityManager();
|
||||
bool isPrivateWin = mLoadInfo->GetOriginAttributes().mPrivateBrowsingId > 0;
|
||||
|
Loading…
Reference in New Issue
Block a user