Bug 558624 - e10s Cookies: Optimize implementation. Part 1. Clean up warning in http. r=dwitte. a=blocking-fennec

--HG--
extra : rebase_source : 5cbdc4b4314575ba339bc6c663279deb8233e812
This commit is contained in:
Doug Turner 2010-10-01 15:18:55 -07:00
Родитель 509e467394
Коммит cbfd722b13
5 изменённых файлов: 25 добавлений и 12 удалений

Просмотреть файл

@ -104,7 +104,10 @@ struct ParamTraits<URI>
nsCOMPtr<nsIClassInfo> classInfo = do_QueryInterface(aParam.mURI);
char cidStr[NSID_LENGTH];
nsCID cid;
nsresult rv = classInfo->GetClassIDNoAlloc(&cid);
#ifdef DEBUG
nsresult rv =
#endif
classInfo->GetClassIDNoAlloc(&cid);
NS_ABORT_IF_FALSE(NS_SUCCEEDED(rv), "All IPDL URIs must report a valid class ID");
cid.ToProvidedString(cidStr);

Просмотреть файл

@ -43,6 +43,7 @@
#include "mozilla/net/HttpChannelParent.h"
#include "mozilla/dom/TabParent.h"
#include "mozilla/net/NeckoParent.h"
#include "mozilla/unused.h"
#include "nsHttpChannel.h"
#include "nsHttpHandler.h"
#include "nsNetUtil.h"
@ -56,6 +57,8 @@
#include "nsIAssociatedContentSecurity.h"
#include "nsISecureBrowserUI.h"
using mozilla::unused;
namespace mozilla {
namespace net {
@ -223,11 +226,12 @@ HttpChannelParentListener::AsyncOnChannelRedirect(
nsHttpResponseHead *responseHead = oldHttpChannel->GetResponseHead();
// TODO: check mActiveChannel->mIPCClosed and return val from Send function
mActiveChannel->SendRedirect1Begin(mRedirectChannel,
IPC::URI(newURI),
redirectFlags,
responseHead ? *responseHead
: nsHttpResponseHead());
unused << mActiveChannel->SendRedirect1Begin(mRedirectChannel,
IPC::URI(newURI),
redirectFlags,
responseHead ? *responseHead
: nsHttpResponseHead());
// mActiveChannel gets the response in RecvRedirect2Result and forwards it
// to this wrapper through OnContentRedirectResultReceived
@ -269,7 +273,7 @@ HttpChannelParentListener::OnRedirectResult(PRBool succeeded)
if (succeeded && !mActiveChannel->mIPCClosed) {
// TODO: check return value: assume child dead if failed
mActiveChannel->SendRedirect3Complete();
unused << mActiveChannel->SendRedirect3Complete();
}
HttpChannelParent* channelToDelete;
@ -283,7 +287,7 @@ HttpChannelParentListener::OnRedirectResult(PRBool succeeded)
}
if (!channelToDelete->mIPCClosed)
HttpChannelParent::Send__delete__(channelToDelete);
unused << HttpChannelParent::Send__delete__(channelToDelete);
mRedirectChannel = nsnull;
return NS_OK;

Просмотреть файл

@ -214,7 +214,10 @@ struct ParamTraits<nsIStringInputStream*>
NS_ASSERTION(value.Length() == length, "SetLength failed");
char *c = value.BeginWriting();
PRUint32 bytesRead;
nsresult rv = aParam->Read(c, length, &bytesRead);
#ifdef DEBUG
nsresult rv =
#endif
aParam->Read(c, length, &bytesRead);
NS_ASSERTION(NS_SUCCEEDED(rv) && bytesRead == length, "Read failed");
}

Просмотреть файл

@ -415,7 +415,7 @@ nsHttpAuthEntry::Set(const char *path,
memcpy(newChall, chall, challLen);
newChall[challLen] = 0;
nsresult rv;
nsresult rv = NS_OK;
if (ident) {
rv = mIdent.Set(*ident);
}

Просмотреть файл

@ -3878,7 +3878,7 @@ nsHttpChannel::ContinueOnStartRequest2(nsresult result)
if (NS_FAILED(mStatus)) {
PushRedirectAsyncFunc(&nsHttpChannel::ContinueOnStartRequest3);
PRBool waitingForRedirectCallback;
nsresult rv = ProcessFallback(&waitingForRedirectCallback);
ProcessFallback(&waitingForRedirectCallback);
if (waitingForRedirectCallback)
return NS_OK;
PopRedirectAsyncFunc(&nsHttpChannel::ContinueOnStartRequest3);
@ -4585,7 +4585,10 @@ nsHttpChannel::WaitForRedirectCallback()
if (mCachePump) {
rv = mCachePump->Suspend();
if (NS_FAILED(rv) && mTransactionPump) {
nsresult resume = mTransactionPump->Resume();
#ifdef DEBUG
nsresult resume =
#endif
mTransactionPump->Resume();
NS_ASSERTION(NS_SUCCEEDED(resume),
"Failed to resume transaction pump");
}