Bug 1764790 - Remove TopLevelNavigationDelegate support. r=nika
Depends on D143926 Differential Revision: https://phabricator.services.mozilla.com/D143927
This commit is contained in:
@@ -9448,23 +9448,6 @@ nsresult nsDocShell::InternalLoad(nsDocShellLoadState* aLoadState,
|
||||
return rv;
|
||||
}
|
||||
|
||||
if (mBrowsingContext->IsTopContent() &&
|
||||
!aLoadState->GetPendingRedirectedChannel()) {
|
||||
nsCOMPtr<nsITopLevelNavigationDelegate> delegate =
|
||||
do_GetInterface(mTreeOwner);
|
||||
if (delegate) {
|
||||
bool shouldNavigate = false;
|
||||
nsIReferrerInfo* referrerInfo = aLoadState->GetReferrerInfo();
|
||||
rv = delegate->ShouldNavigate(
|
||||
this, aLoadState->URI(), aLoadState->LoadType(), referrerInfo,
|
||||
!!aLoadState->PostDataStream(), aLoadState->TriggeringPrincipal(),
|
||||
aLoadState->Csp(), &shouldNavigate);
|
||||
if (NS_SUCCEEDED(rv) && !shouldNavigate) {
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// mContentViewer->PermitUnload can destroy |this| docShell, which
|
||||
// causes the next call of CanSavePresentation to crash.
|
||||
// Hold onto |this| until we return, to prevent a crash from happening.
|
||||
|
||||
Reference in New Issue
Block a user