Backed out changeset 0395717ea76d (bug 1647519) for build bustages at BrowsingContext.cpp. CLOSED TREE
This commit is contained in:
@@ -1798,19 +1798,6 @@ nsresult BrowsingContext::LoadURI(nsDocShellLoadState* aLoadState,
|
||||
aLoadState->GetLoadIdentifier());
|
||||
|
||||
const auto& sourceBC = aLoadState->SourceBrowsingContext();
|
||||
|
||||
if (net::SchemeIsJavascript(aLoadState->URI())) {
|
||||
if (!XRE_IsParentProcess()) {
|
||||
// Web content should only be able to load javascript: URIs into documents
|
||||
// whose principals the caller principal subsumes, which by definition
|
||||
// excludes any document in a cross-process BrowsingContext.
|
||||
return NS_ERROR_DOM_BAD_CROSS_ORIGIN_URI;
|
||||
}
|
||||
MOZ_DIAGNOSTIC_ASSERT(!sourceBC,
|
||||
"Should never see a cross-process javascript: load "
|
||||
"triggered from content");
|
||||
}
|
||||
|
||||
MOZ_DIAGNOSTIC_ASSERT(!sourceBC || sourceBC->Group() == Group());
|
||||
if (sourceBC && sourceBC->IsInProcess()) {
|
||||
if (!sourceBC->CanAccess(this)) {
|
||||
@@ -2680,18 +2667,6 @@ void BrowsingContext::DidSet(FieldIndex<IDX_DefaultLoadFlags>) {
|
||||
nsDocShell::Cast(GetDocShell())->SetLoadGroupDefaultLoadFlags(loadFlags);
|
||||
}
|
||||
|
||||
if (net::SchemeIsJavascript(aLoadState->URI())) {
|
||||
if (!XRE_IsParentProcess()) {
|
||||
// Web content should only be able to load javascript: URIs into documents
|
||||
// whose principals the caller principal subsumes, which by definition
|
||||
// excludes any document in a cross-process BrowsingContext.
|
||||
return NS_ERROR_DOM_BAD_CROSS_ORIGIN_URI;
|
||||
}
|
||||
MOZ_DIAGNOSTIC_ASSERT(!sourceBC,
|
||||
"Should never see a cross-process javascript: load "
|
||||
"triggered from content");
|
||||
}
|
||||
|
||||
if (XRE_IsParentProcess()) {
|
||||
PreOrderWalk([&](BrowsingContext* aContext) {
|
||||
if (aContext != this) {
|
||||
|
||||
Reference in New Issue
Block a user