Bug 1238160 - Set tab context's isolation from frame attr. r=smaug
Renames existing nsFrameLoader::OwnerIsBrowser* methods to add "Moz" prefix for clarity. Adds nsFrameLoader::OwnerIsIsolatedMozBrowserFrame which checks the noisolation attribute of mozbrowser frames, if present. This is used to set isolation in nsFrameLoader::GetNewTabContext only when true. MozReview-Commit-ID: Dz02xBoKh1P
This commit is contained in:
@@ -550,6 +550,20 @@ nsGenericHTMLFrameElement::GetReallyIsWidget(bool *aOut)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* [infallible] */ NS_IMETHODIMP
|
||||
nsGenericHTMLFrameElement::GetIsolated(bool *aOut)
|
||||
{
|
||||
*aOut = true;
|
||||
|
||||
if (!nsContentUtils::IsSystemPrincipal(NodePrincipal())) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Isolation is only disabled if the attribute is present
|
||||
*aOut = !HasAttr(kNameSpaceID_None, nsGkAtoms::noisolation);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* [infallible] */ NS_IMETHODIMP
|
||||
nsGenericHTMLFrameElement::GetIsExpectingSystemMessage(bool *aOut)
|
||||
{
|
||||
@@ -705,4 +719,3 @@ nsGenericHTMLFrameElement::SwapFrameLoaders(nsXULElement& aOtherOwner,
|
||||
{
|
||||
aError.Throw(NS_ERROR_NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user