Bug 1625792 - Remove nsIURIContentListener.onStartURIOpen. r=mattwoodrow
It's only used to check whether the docshell is gone already, and we need to deal with that in other places anyway. No other useful implementation. In comm-central there are a couple, but they're useless too. Differential Revision: https://phabricator.services.mozilla.com/D68731
This commit is contained in:
@@ -9322,32 +9322,14 @@ static bool IsConsideredSameOriginForUIR(nsIPrincipal* aTriggeringPrincipal,
|
||||
|
||||
/* static */ nsresult nsDocShell::CreateRealChannelForDocument(
|
||||
nsIChannel** aChannel, nsIURI* aURI, nsILoadInfo* aLoadInfo,
|
||||
nsIInterfaceRequestor* aCallbacks, nsDocShell* aDocShell,
|
||||
nsIInterfaceRequestor* aCallbacks,
|
||||
nsLoadFlags aLoadFlags, const nsAString& aSrcdoc, nsIURI* aBaseURI) {
|
||||
nsCOMPtr<nsIChannel> channel;
|
||||
nsresult rv;
|
||||
if (aSrcdoc.IsVoid()) {
|
||||
rv = NS_NewChannelInternal(getter_AddRefs(channel), aURI, aLoadInfo,
|
||||
nullptr, // PerformanceStorage
|
||||
nullptr, // loadGroup
|
||||
aCallbacks, aLoadFlags);
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
if (rv == NS_ERROR_UNKNOWN_PROTOCOL && aDocShell) {
|
||||
// This is a uri with a protocol scheme we don't know how
|
||||
// to handle. Embedders might still be interested in
|
||||
// handling the load, though, so we fire a notification
|
||||
// before throwing the load away.
|
||||
bool abort = false;
|
||||
if (NS_SUCCEEDED(
|
||||
aDocShell->mContentListener->OnStartURIOpen(aURI, &abort)) &&
|
||||
abort) {
|
||||
// Hey, they're handling the load for us! How convenient!
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
MOZ_TRY(NS_NewChannelInternal(getter_AddRefs(channel), aURI, aLoadInfo,
|
||||
nullptr, // PerformanceStorage
|
||||
nullptr, // loadGroup
|
||||
aCallbacks, aLoadFlags));
|
||||
|
||||
if (aBaseURI) {
|
||||
nsCOMPtr<nsIViewSourceChannel> vsc = do_QueryInterface(channel);
|
||||
@@ -9458,7 +9440,7 @@ static bool SchemeUsesDocChannel(nsIURI* aURI) {
|
||||
|
||||
nsCOMPtr<nsIChannel> channel;
|
||||
aRv = CreateRealChannelForDocument(getter_AddRefs(channel), aLoadState->URI(),
|
||||
aLoadInfo, aCallbacks, aDocShell,
|
||||
aLoadInfo, aCallbacks,
|
||||
aLoadFlags, srcdoc, aLoadState->BaseURI());
|
||||
NS_ENSURE_SUCCESS(aRv, false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user