зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1575744 - P8. Remove no longer necessary interface. r=mayhemer
Thanks to the promisifying of SendCrossProcessRedirect we no longer needs callback to DocumentChannelParent from nsHttpChannelParent. So we can remove the interface that allowed to do so. Differential Revision: https://phabricator.services.mozilla.com/D46174 --HG-- rename : netwerk/base/nsICrossProcessSwitchChannel.idl => netwerk/base/nsIProcessSwitchRequestor.idl extra : moz-landing-system : lando
This commit is contained in:
Родитель
7cdc8e0a68
Коммит
e3fc8f8970
|
@ -35,7 +35,6 @@ XPIDL_SOURCES += [
|
|||
'nsIClassifiedChannel.idl',
|
||||
'nsIClassOfService.idl',
|
||||
'nsIContentSniffer.idl',
|
||||
'nsICrossProcessSwitchChannel.idl',
|
||||
'nsIDashboard.idl',
|
||||
'nsIDashboardEventNotifier.idl',
|
||||
'nsIDeprecationWarner.idl',
|
||||
|
@ -76,6 +75,7 @@ XPIDL_SOURCES += [
|
|||
'nsIPermission.idl',
|
||||
'nsIPermissionManager.idl',
|
||||
'nsIPrivateBrowsingChannel.idl',
|
||||
'nsIProcessSwitchRequestor.idl',
|
||||
'nsIProgressEventSink.idl',
|
||||
'nsIPrompt.idl',
|
||||
'nsIProtocolHandler.idl',
|
||||
|
|
|
@ -4,26 +4,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "nsIAsyncVerifyRedirectCallback.idl"
|
||||
#include "nsIHttpChannel.idl"
|
||||
|
||||
[scriptable, uuid(d2471b64-0292-4cb5-b801-914e34b31af0)]
|
||||
interface nsICrossProcessSwitchChannel : nsISupports
|
||||
{
|
||||
/**
|
||||
* When a process switch is about to start,
|
||||
* nsHttpChannel will call this method on DocumentChannelParent or
|
||||
* HttpChannelParent
|
||||
*
|
||||
* @param channel
|
||||
* nsIHttpChannel caller.
|
||||
* @param identifier
|
||||
* identifier from SessionStore to be passed to the childChannel in
|
||||
* order to identify it.
|
||||
*/
|
||||
void triggerCrossProcessSwitch(in nsIHttpChannel channel, in uint64_t identifier);
|
||||
};
|
||||
#include "nsIChannel.idl"
|
||||
|
||||
/**
|
||||
* The nsIProcessSwitchRequestor interface allows clients to instruct
|
|
@ -39,7 +39,6 @@ NS_INTERFACE_MAP_BEGIN(DocumentChannelParent)
|
|||
NS_INTERFACE_MAP_ENTRY(nsIStreamListener)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIParentChannel)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIAsyncVerifyRedirectReadyCallback)
|
||||
NS_INTERFACE_MAP_ENTRY(nsICrossProcessSwitchChannel)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIChannelEventSink)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIProcessSwitchRequestor)
|
||||
NS_INTERFACE_MAP_ENTRY_CONCRETE(DocumentChannelParent)
|
||||
|
@ -359,14 +358,6 @@ void DocumentChannelParent::FinishReplacementChannelSetup(bool aSucceeded) {
|
|||
}
|
||||
}
|
||||
|
||||
nsresult DocumentChannelParent::TriggerCrossProcessSwitch(
|
||||
nsIHttpChannel* aChannel, uint64_t aIdentifier) {
|
||||
MOZ_ASSERT_UNREACHABLE(
|
||||
"We can no longer be called from nsHttpChannel, this interface will be "
|
||||
"removed in a follow-up patch");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void DocumentChannelParent::TriggerCrossProcessSwitch() {
|
||||
MOZ_ASSERT(mRedirectContentProcessIdPromise);
|
||||
CancelChildForProcessSwitch();
|
||||
|
|
|
@ -13,11 +13,11 @@
|
|||
#include "mozilla/net/NeckoParent.h"
|
||||
#include "mozilla/net/PDocumentChannelParent.h"
|
||||
#include "mozilla/net/ParentChannelListener.h"
|
||||
#include "nsICrossProcessSwitchChannel.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsIParentChannel.h"
|
||||
#include "nsIParentRedirectingChannel.h"
|
||||
#include "nsIProcessSwitchRequestor.h"
|
||||
#include "nsIRedirectResultListener.h"
|
||||
|
||||
#define DOCUMENT_CHANNEL_PARENT_IID \
|
||||
|
@ -37,7 +37,6 @@ class DocumentChannelParent : public nsIInterfaceRequestor,
|
|||
public nsIAsyncVerifyRedirectReadyCallback,
|
||||
public nsIParentChannel,
|
||||
public nsIChannelEventSink,
|
||||
public nsICrossProcessSwitchChannel,
|
||||
public HttpChannelSecurityWarningReporter,
|
||||
public nsIProcessSwitchRequestor {
|
||||
public:
|
||||
|
@ -54,7 +53,6 @@ class DocumentChannelParent : public nsIInterfaceRequestor,
|
|||
NS_DECL_NSIINTERFACEREQUESTOR
|
||||
NS_DECL_NSIASYNCVERIFYREDIRECTREADYCALLBACK
|
||||
NS_DECL_NSICHANNELEVENTSINK
|
||||
NS_DECL_NSICROSSPROCESSSWITCHCHANNEL
|
||||
NS_DECL_NSIPROCESSSWITCHREQUESTOR
|
||||
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(DOCUMENT_CHANNEL_PARENT_IID)
|
||||
|
|
|
@ -289,7 +289,6 @@ NS_INTERFACE_MAP_BEGIN(HttpChannelParent)
|
|||
NS_INTERFACE_MAP_ENTRY(nsIAsyncVerifyRedirectReadyCallback)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIChannelEventSink)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIRedirectResultListener)
|
||||
NS_INTERFACE_MAP_ENTRY(nsICrossProcessSwitchChannel)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIParentRedirectingChannel)
|
||||
NS_INTERFACE_MAP_ENTRY_CONCRETE(HttpChannelParent)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include "mozilla/net/NeckoCommon.h"
|
||||
#include "mozilla/net/NeckoParent.h"
|
||||
#include "mozilla/MozPromise.h"
|
||||
#include "nsICrossProcessSwitchChannel.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsIParentRedirectingChannel.h"
|
||||
#include "nsIProgressEventSink.h"
|
||||
|
@ -61,8 +60,7 @@ class HttpChannelParent final : public nsIInterfaceRequestor,
|
|||
public HttpChannelSecurityWarningReporter,
|
||||
public nsIAsyncVerifyRedirectReadyCallback,
|
||||
public nsIChannelEventSink,
|
||||
public nsIRedirectResultListener,
|
||||
public nsICrossProcessSwitchChannel {
|
||||
public nsIRedirectResultListener {
|
||||
virtual ~HttpChannelParent();
|
||||
|
||||
public:
|
||||
|
@ -78,7 +76,6 @@ class HttpChannelParent final : public nsIInterfaceRequestor,
|
|||
NS_DECL_NSIASYNCVERIFYREDIRECTREADYCALLBACK
|
||||
NS_DECL_NSICHANNELEVENTSINK
|
||||
NS_DECL_NSIREDIRECTRESULTLISTENER
|
||||
NS_DECL_NSICROSSPROCESSSWITCHCHANNEL
|
||||
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(HTTP_CHANNEL_PARENT_IID)
|
||||
|
||||
|
@ -132,6 +129,13 @@ class HttpChannelParent final : public nsIInterfaceRequestor,
|
|||
|
||||
base::ProcessId OtherPid() const;
|
||||
|
||||
// Called by nsHttpChannel when a process switch is about to start.
|
||||
// aChannel: nsIHttpChannel caller.
|
||||
// aIdentifier: identifier from SessionStore to be passed to the childChannel
|
||||
// in order to identify it.
|
||||
nsresult TriggerCrossProcessSwitch(nsIHttpChannel* aChannel,
|
||||
uint64_t aIdentifier);
|
||||
|
||||
// Calling this method will cancel the HttpChannelChild because the consumer
|
||||
// needs to be relocated to another process.
|
||||
// Any OnStart/Stop/DataAvailable calls that follow will not be sent to the
|
||||
|
|
|
@ -7298,8 +7298,7 @@ nsresult nsHttpChannel::StartCrossProcessRedirect() {
|
|||
|
||||
nsCOMPtr<nsIParentChannel> parentChannel;
|
||||
NS_QueryNotificationCallbacks(this, parentChannel);
|
||||
nsCOMPtr<nsICrossProcessSwitchChannel> httpParent =
|
||||
do_QueryInterface(parentChannel);
|
||||
RefPtr<HttpChannelParent> httpParent = do_QueryObject(parentChannel);
|
||||
MOZ_ASSERT(httpParent);
|
||||
NS_ENSURE_TRUE(httpParent, NS_ERROR_UNEXPECTED);
|
||||
|
||||
|
|
|
@ -33,8 +33,8 @@
|
|||
#include "nsIRaceCacheWithNetwork.h"
|
||||
#include "mozilla/extensions/PStreamFilterParent.h"
|
||||
#include "mozilla/Mutex.h"
|
||||
#include "nsIProcessSwitchRequestor.h"
|
||||
#include "nsIRemoteTab.h"
|
||||
#include "nsICrossProcessSwitchChannel.h"
|
||||
|
||||
class nsDNSPrefetch;
|
||||
class nsICancelable;
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include "nsHttpChannel.h"
|
||||
#include "nsHttpAuthCache.h"
|
||||
#include "nsStandardURL.h"
|
||||
#include "nsICrossProcessSwitchChannel.h"
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsIHttpChannel.h"
|
||||
#include "nsIStandardURL.h"
|
||||
|
@ -24,6 +23,7 @@
|
|||
#include "nsIPrefService.h"
|
||||
#include "nsIPrefBranch.h"
|
||||
#include "nsIPrefLocalizedString.h"
|
||||
#include "nsIProcessSwitchRequestor.h"
|
||||
#include "nsSocketProviderService.h"
|
||||
#include "nsISocketProvider.h"
|
||||
#include "nsPrintfCString.h"
|
||||
|
|
Загрузка…
Ссылка в новой задаче