From a3674174c8f6509a62fb2b02c25a6d2c38ca85fc Mon Sep 17 00:00:00 2001 From: Jason Duell Date: Sat, 27 Mar 2010 18:53:46 -0700 Subject: [PATCH] Bug 558486: Stub functions in HttpChannelChild to allow testXUL demo to run. a=jduell, r=dwitte --- netwerk/protocol/http/src/HttpBaseChannel.cpp | 9 ---- .../protocol/http/src/HttpChannelChild.cpp | 44 ++++++++++++++----- netwerk/protocol/http/src/nsHttpHandler.cpp | 7 --- 3 files changed, 33 insertions(+), 27 deletions(-) diff --git a/netwerk/protocol/http/src/HttpBaseChannel.cpp b/netwerk/protocol/http/src/HttpBaseChannel.cpp index 68ae6aa00e01..e41fe024b846 100644 --- a/netwerk/protocol/http/src/HttpBaseChannel.cpp +++ b/netwerk/protocol/http/src/HttpBaseChannel.cpp @@ -44,15 +44,6 @@ #include "nsMimeTypes.h" #include "nsNetUtil.h" -#define DROP_DEAD() \ - do { \ - fprintf(stderr, \ - "*&*&*&*&*&*&*&**&*&&*& FATAL ERROR: '%s' UNIMPLEMENTED: %s +%d", \ - __FUNCTION__, __FILE__, __LINE__); \ - NS_ABORT(); \ - return NS_ERROR_NOT_IMPLEMENTED; \ - } while (0) - namespace mozilla { namespace net { diff --git a/netwerk/protocol/http/src/HttpChannelChild.cpp b/netwerk/protocol/http/src/HttpChannelChild.cpp index a0e9958c8c59..115fc6fe06c1 100644 --- a/netwerk/protocol/http/src/HttpChannelChild.cpp +++ b/netwerk/protocol/http/src/HttpChannelChild.cpp @@ -172,7 +172,8 @@ HttpChannelChild::RecvOnStopRequest(const nsresult& statusCode) NS_IMETHODIMP HttpChannelChild::Cancel(nsresult status) { - DROP_DEAD(); + // FIXME: bug 536317 + return NS_OK; } NS_IMETHODIMP @@ -191,21 +192,28 @@ HttpChannelChild::Resume() // HttpChannelChild::nsIChannel //----------------------------------------------------------------------------- NS_IMETHODIMP -HttpChannelChild::GetOwner(nsISupports **aOwner) +HttpChannelChild::GetOwner(nsISupports **result) { - DROP_DEAD(); + // FIXME bug 547051 + NS_ENSURE_ARG_POINTER(result); + *result = nsnull; + return NS_OK; } NS_IMETHODIMP HttpChannelChild::SetOwner(nsISupports *aOwner) { + // FIXME bug 547051 DROP_DEAD(); } NS_IMETHODIMP HttpChannelChild::GetSecurityInfo(nsISupports **aSecurityInfo) { - DROP_DEAD(); + // FIXME: Stub for bug 536301 . + NS_ENSURE_ARG_POINTER(aSecurityInfo); + *aSecurityInfo = 0; + return NS_OK; } NS_IMETHODIMP @@ -330,7 +338,8 @@ HttpChannelChild::SetupFallbackChannel(const char *aFallbackKey) NS_IMETHODIMP HttpChannelChild::GetCacheToken(nsISupports **aCacheToken) { - DROP_DEAD(); + // FIXME: stub for bug 537164 + return NS_ERROR_NOT_AVAILABLE; } NS_IMETHODIMP HttpChannelChild::SetCacheToken(nsISupports *aCacheToken) @@ -352,7 +361,10 @@ HttpChannelChild::SetOfflineCacheToken(nsISupports *aOfflineCacheToken) NS_IMETHODIMP HttpChannelChild::GetCacheKey(nsISupports **aCacheKey) { - DROP_DEAD(); + // FIXME: stub for bug 537164 + NS_ENSURE_ARG_POINTER(aCacheKey); + *aCacheKey = 0; + return NS_OK; } NS_IMETHODIMP HttpChannelChild::SetCacheKey(nsISupports *aCacheKey) @@ -400,9 +412,14 @@ HttpChannelChild::GetCacheFile(nsIFile **aCacheFile) } NS_IMETHODIMP -HttpChannelChild::IsFromCache(PRBool *retval) +HttpChannelChild::IsFromCache(PRBool *value) { - DROP_DEAD(); + if (!mIsPending) + return NS_ERROR_NOT_AVAILABLE; + + // FIXME: stub for bug 537164 + *value = false; + return NS_OK; } //----------------------------------------------------------------------------- @@ -418,9 +435,12 @@ HttpChannelChild::SetUploadStream(nsIInputStream *aStream, } NS_IMETHODIMP -HttpChannelChild::GetUploadStream(nsIInputStream **aUploadStream) +HttpChannelChild::GetUploadStream(nsIInputStream **stream) { - DROP_DEAD(); + // FIXME: stub for bug 536273 + NS_ENSURE_ARG_POINTER(stream); + *stream = 0; + return NS_OK; } //----------------------------------------------------------------------------- @@ -540,7 +560,9 @@ HttpChannelChild::SetApplicationCache(nsIApplicationCache *aApplicationCache) NS_IMETHODIMP HttpChannelChild::GetLoadedFromApplicationCache(PRBool *retval) { - DROP_DEAD(); + // FIXME: stub for bug 536295 + *retval = 0; + return NS_OK; } NS_IMETHODIMP diff --git a/netwerk/protocol/http/src/nsHttpHandler.cpp b/netwerk/protocol/http/src/nsHttpHandler.cpp index 2ba33ef58cc1..15826eca1e86 100644 --- a/netwerk/protocol/http/src/nsHttpHandler.cpp +++ b/netwerk/protocol/http/src/nsHttpHandler.cpp @@ -1543,13 +1543,6 @@ nsHttpHandler::NewProxiedChannel(nsIURI *uri, #ifdef MOZ_IPC if (IsNeckoChild()) { LOG(("NECKO_E10S_HTTP set: using experimental interprocess HTTP\n")); - - // TODO: Just ignore HTTPS and proxying for now - if (https) - DROP_DEAD(); - if (givenProxyInfo) - DROP_DEAD(); - httpChannel = new HttpChannelChild(); } else #endif