Bug 1260931 - Part 3: Propagate firstPartyDomain. r=smaug

This commit is contained in:
Yoshi Huang
2016-08-26 12:41:37 +08:00
parent 122bdaeda2
commit c346f0771b
6 changed files with 90 additions and 30 deletions

View File

@@ -10812,7 +10812,10 @@ nsDocShell::DoURILoad(nsIURI* aURI,
// OriginAttributes of the parent document. Or in case there isn't a
// parent document.
NeckoOriginAttributes neckoAttrs;
neckoAttrs.InheritFromDocShellToNecko(GetOriginAttributes());
bool isTopLevelDoc = aContentPolicyType == nsIContentPolicy::TYPE_DOCUMENT &&
mItemType == typeContent &&
!GetIsMozBrowserOrApp();
neckoAttrs.InheritFromDocShellToNecko(GetOriginAttributes(), isTopLevelDoc, aURI);
rv = loadInfo->SetOriginAttributes(neckoAttrs);
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;