diff --git a/docshell/base/LoadContext.cpp b/docshell/base/LoadContext.cpp index 605ada9734b..be7da52610f 100644 --- a/docshell/base/LoadContext.cpp +++ b/docshell/base/LoadContext.cpp @@ -34,7 +34,7 @@ nsILoadContext::GetOriginAttributes(mozilla::DocShellOriginAttributes& aAttrs) aAttrs = attrs; return true; } - + namespace mozilla { NS_IMPL_ISUPPORTS(LoadContext, nsILoadContext, nsIInterfaceRequestor) @@ -172,13 +172,13 @@ LoadContext::SetRemoteTabs(bool aUseRemoteTabs) } NS_IMETHODIMP -LoadContext::GetIsInBrowserElement(bool* aIsInBrowserElement) +LoadContext::GetIsInIsolatedMozBrowserElement(bool* aIsInIsolatedMozBrowserElement) { MOZ_ASSERT(mIsNotNull); - NS_ENSURE_ARG_POINTER(aIsInBrowserElement); + NS_ENSURE_ARG_POINTER(aIsInIsolatedMozBrowserElement); - *aIsInBrowserElement = mOriginAttributes.mInIsolatedMozBrowser; + *aIsInIsolatedMozBrowserElement = mOriginAttributes.mInIsolatedMozBrowser; return NS_OK; } diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index 9cd3c684aa8..33674234588 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -3500,7 +3500,8 @@ nsDocShell::CanAccessItem(nsIDocShellTreeItem* aTargetItem, return false; } - if (targetDS->GetIsInBrowserElement() != accessingDS->GetIsInBrowserElement() || + if (targetDS->GetIsInIsolatedMozBrowserElement() != + accessingDS->GetIsInIsolatedMozBrowserElement() || targetDS->GetAppId() != accessingDS->GetAppId()) { return false; } @@ -13938,9 +13939,9 @@ nsDocShell::GetInheritedFrameType() } /* [infallible] */ NS_IMETHODIMP -nsDocShell::GetIsInBrowserElement(bool* aIsInBrowserElement) +nsDocShell::GetIsInIsolatedMozBrowserElement(bool* aIsInIsolatedMozBrowserElement) { - *aIsInBrowserElement = (GetInheritedFrameType() == eFrameTypeBrowser); + *aIsInIsolatedMozBrowserElement = (GetInheritedFrameType() == eFrameTypeBrowser); return NS_OK; } diff --git a/docshell/base/nsIDocShell.idl b/docshell/base/nsIDocShell.idl index 7654e64b75d..ba07aa46c83 100644 --- a/docshell/base/nsIDocShell.idl +++ b/docshell/base/nsIDocShell.idl @@ -780,16 +780,21 @@ interface nsIDocShell : nsIDocShellTreeItem [infallible] readonly attribute boolean isBrowserOrApp; /** - * Returns true if this docshell corresponds to an