diff --git a/netwerk/protocol/http/HttpChannelChild.cpp b/netwerk/protocol/http/HttpChannelChild.cpp index 43a599b25b05..784f503f9abe 100644 --- a/netwerk/protocol/http/HttpChannelChild.cpp +++ b/netwerk/protocol/http/HttpChannelChild.cpp @@ -260,6 +260,8 @@ HttpChannelChild::OnStartRequest(const nsHttpResponseHead& responseHead, mCacheEntryAvailable = cacheEntryAvailable; mCacheExpirationTime = cacheExpirationTime; mCachedCharset = cachedCharset; + mSelfAddr = selfAddr; + mPeerAddr = peerAddr; AutoEventEnqueuer ensureSerialDispatch(mEventQ); @@ -286,9 +288,6 @@ HttpChannelChild::OnStartRequest(const nsHttpResponseHead& responseHead, rv = ApplyContentConversions(); if (NS_FAILED(rv)) Cancel(rv); - - mSelfAddr = selfAddr; - mPeerAddr = peerAddr; } class TransportAndDataEvent : public ChannelEvent @@ -1085,36 +1084,6 @@ HttpChannelChild::SetupFallbackChannel(const char *aFallbackKey) DROP_DEAD(); } -// The next four _should_ be implemented, but we need to figure out how -// to transfer the data from the chrome process first. - -NS_IMETHODIMP -HttpChannelChild::GetRemoteAddress(nsACString & _result) -{ - return NS_ERROR_NOT_AVAILABLE; -} - -NS_IMETHODIMP -HttpChannelChild::GetRemotePort(PRInt32 * _result) -{ - NS_ENSURE_ARG_POINTER(_result); - return NS_ERROR_NOT_AVAILABLE; -} - -NS_IMETHODIMP -HttpChannelChild::GetLocalAddress(nsACString & _result) -{ - return NS_ERROR_NOT_AVAILABLE; -} - -NS_IMETHODIMP -HttpChannelChild::GetLocalPort(PRInt32 * _result) -{ - NS_ENSURE_ARG_POINTER(_result); - return NS_ERROR_NOT_AVAILABLE; -} - - //----------------------------------------------------------------------------- // HttpChannelChild::nsICacheInfoChannel //----------------------------------------------------------------------------- diff --git a/netwerk/protocol/http/HttpChannelChild.h b/netwerk/protocol/http/HttpChannelChild.h index e5937aa5c797..800416313210 100644 --- a/netwerk/protocol/http/HttpChannelChild.h +++ b/netwerk/protocol/http/HttpChannelChild.h @@ -106,10 +106,6 @@ public: PRBool aMerge); // nsIHttpChannelInternal NS_IMETHOD SetupFallbackChannel(const char *aFallbackKey); - NS_IMETHOD GetLocalAddress(nsACString& addr); - NS_IMETHOD GetLocalPort(PRInt32* port); - NS_IMETHOD GetRemoteAddress(nsACString& addr); - NS_IMETHOD GetRemotePort(PRInt32* port); // nsISupportsPriority NS_IMETHOD SetPriority(PRInt32 value); // nsIResumableChannel diff --git a/netwerk/test/unit/test_traceable_channel.js b/netwerk/test/unit/test_traceable_channel.js index a62b8a2c92b3..0e614aa7b340 100644 --- a/netwerk/test/unit/test_traceable_channel.js +++ b/netwerk/test/unit/test_traceable_channel.js @@ -22,14 +22,14 @@ TracingListener.prototype = { request.QueryInterface(Components.interfaces.nsIHttpChannelInternal); -// local/remote addresses broken in e10s: disable for now -/* do_check_eq(request.localAddress, "127.0.0.1"); do_check_eq(request.localPort > 0, true); do_check_neq(request.localPort, 4444); do_check_eq(request.remoteAddress, "127.0.0.1"); do_check_eq(request.remotePort, 4444); -*/ + + request.QueryInterface(Components.interfaces.nsISupportsPriority); + request.priority = Ci.nsISupportsPriority.PRIORITY_LOW; // Make sure listener can't be replaced after OnStartRequest was called. request.QueryInterface(Components.interfaces.nsITraceableChannel);