Bug 1533877 - Frame navigations should check their parent's Cross-Origin policy r=nika
Differential Revision: https://phabricator.services.mozilla.com/D32972
This commit is contained in:
@@ -116,11 +116,13 @@ already_AddRefed<BrowsingContext> BrowsingContext::Create(
|
||||
// using transactions to set them, as we haven't been attached yet.
|
||||
context->mName = aName;
|
||||
context->mOpenerId = aOpener ? aOpener->Id() : 0;
|
||||
context->mCrossOriginPolicy = nsILoadInfo::CROSS_ORIGIN_POLICY_NULL;
|
||||
context->mInheritedCrossOriginPolicy = nsILoadInfo::CROSS_ORIGIN_POLICY_NULL;
|
||||
|
||||
BrowsingContext* inherit = aParent ? aParent : aOpener;
|
||||
if (inherit) {
|
||||
context->mOpenerPolicy = inherit->mOpenerPolicy;
|
||||
context->mCrossOriginPolicy = inherit->mCrossOriginPolicy;
|
||||
context->mInheritedCrossOriginPolicy = inherit->mCrossOriginPolicy;
|
||||
}
|
||||
|
||||
Register(context);
|
||||
|
||||
Reference in New Issue
Block a user