diff --git a/netwerk/base/nsNetUtil.cpp b/netwerk/base/nsNetUtil.cpp index 6b88a251de5e..9415999df352 100644 --- a/netwerk/base/nsNetUtil.cpp +++ b/netwerk/base/nsNetUtil.cpp @@ -1251,25 +1251,12 @@ bool NS_GetOriginAttributes(nsIChannel *aChannel, mozilla::NeckoOriginAttributes &aAttributes) { - nsCOMPtr loadContext; nsCOMPtr loadInfo = aChannel->GetLoadInfo(); - NS_QueryNotificationCallbacks(aChannel, loadContext); - - if (!loadContext && !loadInfo) { + if (!loadInfo) { return false; } - // Bug 1270678 - By default, we would acquire the originAttributes from - // the loadContext. But in some cases, say, loading the favicon, that the - // loadContext is not available. We would use the loadInfo to get - // originAttributes instead. - if (loadContext) { - DocShellOriginAttributes doa; - loadContext->GetOriginAttributes(doa); - aAttributes.InheritFromDocShellToNecko(doa); - } else { - loadInfo->GetOriginAttributes(&aAttributes); - } + loadInfo->GetOriginAttributes(&aAttributes); aAttributes.SyncAttributesWithPrivateBrowsing(NS_UsePrivateBrowsing(aChannel)); return true; }