Backed out changeset e4cefba9f87e (bug 1647519) for build bustages in BrowsingContext.cpp. CLOSED TREE
This commit is contained in:
@@ -743,22 +743,6 @@ nsDocShell::SetCancelContentJSEpoch(int32_t aEpoch) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult nsDocShell::CheckDisallowedJavascriptLoad(
|
||||
nsDocShellLoadState* aLoadState) {
|
||||
if (!net::SchemeIsJavascript(aLoadState->URI())) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (nsCOMPtr<nsIPrincipal> targetPrincipal =
|
||||
GetInheritedPrincipal(/* aConsiderCurrentDocument */ true)) {
|
||||
if (!aLoadState->TriggeringPrincipal()->Subsumes(targetPrincipal)) {
|
||||
return NS_ERROR_DOM_BAD_CROSS_ORIGIN_URI;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_ERROR_DOM_BAD_CROSS_ORIGIN_URI;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::LoadURI(nsDocShellLoadState* aLoadState, bool aSetNavigating) {
|
||||
return LoadURI(aLoadState, aSetNavigating, false);
|
||||
@@ -783,8 +767,6 @@ nsresult nsDocShell::LoadURI(nsDocShellLoadState* aLoadState,
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
MOZ_TRY(CheckDisallowedJavascriptLoad(aLoadState));
|
||||
|
||||
bool oldIsNavigating = mIsNavigating;
|
||||
auto cleanupIsNavigating =
|
||||
MakeScopeExit([&]() { mIsNavigating = oldIsNavigating; });
|
||||
@@ -9213,8 +9195,6 @@ nsresult nsDocShell::InternalLoad(nsDocShellLoadState* aLoadState,
|
||||
aLoadState->TargetBrowsingContext() == GetBrowsingContext(),
|
||||
"Load must be targeting this BrowsingContext");
|
||||
|
||||
MOZ_TRY(CheckDisallowedJavascriptLoad(aLoadState));
|
||||
|
||||
// If we don't have a target, we're loading into ourselves, and our load
|
||||
// delegate may want to intercept that load.
|
||||
SameDocumentNavigationState sameDocumentNavigationState;
|
||||
|
||||
Reference in New Issue
Block a user