From 2feb4192d5e0cb9e57a3a59767e6cd605673ca22 Mon Sep 17 00:00:00 2001 From: Jason Duell Date: Mon, 26 Apr 2010 16:23:43 -0700 Subject: [PATCH] Bug 561693 - e10s HTTP: Provide way for nsHttpChannel to know if it's servicing a remote child. r=dwitte,jdm --- netwerk/protocol/http/src/HttpChannelParent.cpp | 1 + netwerk/protocol/http/src/nsHttpChannel.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/netwerk/protocol/http/src/HttpChannelParent.cpp b/netwerk/protocol/http/src/HttpChannelParent.cpp index f04355e60c73..3d2114d7db7c 100644 --- a/netwerk/protocol/http/src/HttpChannelParent.cpp +++ b/netwerk/protocol/http/src/HttpChannelParent.cpp @@ -108,6 +108,7 @@ HttpChannelParent::RecvAsyncOpen(const IPC::URI& aURI, return false; // TODO: send fail msg to child, return true nsHttpChannel *httpChan = static_cast(mChannel.get()); + httpChan->SetRemoteChannel(); if (originalUri) httpChan->SetOriginalURI(originalUri); diff --git a/netwerk/protocol/http/src/nsHttpChannel.h b/netwerk/protocol/http/src/nsHttpChannel.h index fb0baf37cf24..a3bb2853648c 100644 --- a/netwerk/protocol/http/src/nsHttpChannel.h +++ b/netwerk/protocol/http/src/nsHttpChannel.h @@ -129,6 +129,7 @@ public: public: /* internal necko use only */ typedef void (nsHttpChannel:: *nsAsyncCallback)(void); nsHttpResponseHead * GetResponseHead() const { return mResponseHead; } + void SetRemoteChannel() { mRemoteChannel = 1; } nsresult SetReferrerInternal(nsIURI *referrer) { nsCAutoString spec; @@ -351,6 +352,8 @@ private: // headers. In such a case we must not override them in the cache code // and also we want to pass possible 304 code response through. PRUint32 mCustomConditionalRequest : 1; + // True iff this channel is servicing a remote HttpChannelChild + PRUint32 mRemoteChannel : 1; class nsContentEncodings : public nsIUTF8StringEnumerator {