Bug 1460685 - Remove security.allow_chrome_frames_inside_content case from nsDocument;r=Gijs
This pref will be removed in the following changeset.
MozReview-Commit-ID: E9TvPyxAgrf
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -278,20 +278,16 @@ using namespace mozilla;
using namespace mozilla::dom;
typedef nsTArray<Link*> LinkArray;
static LazyLogModule gDocumentLeakPRLog("DocumentLeak");
static LazyLogModule gCspPRLog("CSP");
static LazyLogModule gUserInteractionPRLog("UserInteraction");
-static const char kChromeInContentPref[] = "security.allow_chrome_frames_inside_content";
-static bool sChromeInContentAllowed = false;
-static bool sChromeInContentPrefCached = false;
-
static nsresult
GetHttpChannelHelper(nsIChannel* aChannel, nsIHttpChannel** aHttpChannel)
{
nsCOMPtr<nsIHttpChannel> httpChannel = do_QueryInterface(aChannel);
if (httpChannel) {
httpChannel.forget(aHttpChannel);
return NS_OK;
}
@@ -2391,23 +2387,17 @@ nsIDocument::MaybeDowngradePrincipal(nsI
if (basePrin->Is<ExpandedPrincipal>()) {
MOZ_DIAGNOSTIC_ASSERT(false, "Should never try to create a document with "
"an expanded principal");
auto* expanded = basePrin->As<ExpandedPrincipal>();
return do_AddRef(expanded->WhiteList().LastElement());
}
- if (!sChromeInContentPrefCached) {
- sChromeInContentPrefCached = true;
- Preferences::AddBoolVarCache(&sChromeInContentAllowed,
- kChromeInContentPref, false);
- }
- if (!sChromeInContentAllowed &&
- nsContentUtils::IsSystemPrincipal(aPrincipal)) {
+ if (nsContentUtils::IsSystemPrincipal(aPrincipal)) {
// We basically want the parent document here, but because this is very
// early in the load, GetParentDocument() returns null, so we use the
// docshell hierarchy to get this information instead.
if (mDocumentContainer) {
nsCOMPtr<nsIDocShellTreeItem> parentDocShellItem;
mDocumentContainer->GetParent(getter_AddRefs(parentDocShellItem));
nsCOMPtr<nsIDocShell> parentDocShell = do_QueryInterface(parentDocShellItem);
if (parentDocShell) {