mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Backed out changeset 51b6694efc8f (bug 1260931)
This commit is contained in:
parent
377592d09b
commit
83cd5f7eeb
@ -2901,36 +2901,6 @@ HttpBaseChannel::SetupReplacementChannel(nsIURI *newURI,
|
||||
if (mLoadInfo) {
|
||||
nsCOMPtr<nsILoadInfo> newLoadInfo =
|
||||
static_cast<mozilla::LoadInfo*>(mLoadInfo.get())->Clone();
|
||||
|
||||
// re-compute the origin attributes of the loadInfo if it's top-level load.
|
||||
bool isTopLevelDoc =
|
||||
newLoadInfo->GetExternalContentPolicyType() == nsIContentPolicy::TYPE_DOCUMENT;
|
||||
|
||||
if (isTopLevelDoc) {
|
||||
nsCOMPtr<nsILoadContext> loadContext;
|
||||
NS_QueryNotificationCallbacks(this, loadContext);
|
||||
DocShellOriginAttributes docShellAttrs;
|
||||
if (loadContext) {
|
||||
loadContext->GetOriginAttributes(docShellAttrs);
|
||||
}
|
||||
MOZ_ASSERT(docShellAttrs.mFirstPartyDomain.IsEmpty(),
|
||||
"top-level docshell shouldn't have firstPartyDomain attribute.");
|
||||
|
||||
NeckoOriginAttributes attrs = newLoadInfo->GetOriginAttributes();
|
||||
|
||||
MOZ_ASSERT(docShellAttrs.mAppId == attrs.mAppId,
|
||||
"docshell and necko should have the same appId attribute.");
|
||||
MOZ_ASSERT(docShellAttrs.mUserContextId == attrs.mUserContextId,
|
||||
"docshell and necko should have the same userContextId attribute.");
|
||||
MOZ_ASSERT(docShellAttrs.mInIsolatedMozBrowser == attrs.mInIsolatedMozBrowser,
|
||||
"docshell and necko should have the same inIsolatedMozBrowser attribute.");
|
||||
MOZ_ASSERT(docShellAttrs.mPrivateBrowsingId == attrs.mPrivateBrowsingId,
|
||||
"docshell and necko should have the same privateBrowsingId attribute.");
|
||||
|
||||
attrs.InheritFromDocShellToNecko(docShellAttrs, true, newURI);
|
||||
newLoadInfo->SetOriginAttributes(attrs);
|
||||
}
|
||||
|
||||
bool isInternalRedirect =
|
||||
(redirectFlags & (nsIChannelEventSink::REDIRECT_INTERNAL |
|
||||
nsIChannelEventSink::REDIRECT_STS_UPGRADE));
|
||||
|
Loading…
Reference in New Issue
Block a user