MozillaThunderbird/mozilla-revert_621446.patch

149 lines
5.0 KiB
Diff
Raw Normal View History

# HG changeset patch
# Parent 8da41a2cee774ce4d00b9ac1032a495b8bc560a0
Revert investigation patch for bmo#621446; as it is useless on desktop and breaks the build for certain compilers
diff --git a/netwerk/protocol/http/HttpChannelParent.cpp b/netwerk/protocol/http/HttpChannelParent.cpp
--- a/netwerk/protocol/http/HttpChannelParent.cpp
+++ b/netwerk/protocol/http/HttpChannelParent.cpp
@@ -52,29 +52,25 @@
#include "nsIBadCertListener2.h"
#include "nsICacheEntryDescriptor.h"
#include "nsSerializationHelper.h"
#include "nsISerializable.h"
#include "nsIAssociatedContentSecurity.h"
#include "nsIApplicationCacheService.h"
#include "nsIOfflineCacheUpdate.h"
#include "nsIRedirectChannelRegistrar.h"
-#include "prinit.h"
namespace mozilla {
namespace net {
HttpChannelParent::HttpChannelParent(PBrowserParent* iframeEmbedding)
: mIPCClosed(false)
, mStoredStatus(0)
, mStoredProgress(0)
, mStoredProgressMax(0)
- , mSentRedirect1Begin(false)
- , mSentRedirect1BeginFailed(false)
- , mReceivedRedirect2Verify(false)
{
// Ensure gHttpHandler is initialized: we need the atom table up and running.
nsIHttpProtocolHandler* handler;
CallGetService(NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "http", &handler);
NS_ASSERTION(handler, "no http handler");
mTabParent = do_QueryObject(static_cast<TabParent*>(iframeEmbedding));
}
@@ -326,21 +322,16 @@ HttpChannelParent::RecvUpdateAssociatedC
mAssociatedContentSecurity->SetCountSubRequestsHighSecurity(high);
mAssociatedContentSecurity->SetCountSubRequestsLowSecurity(low);
mAssociatedContentSecurity->SetCountSubRequestsBrokenSecurity(broken);
mAssociatedContentSecurity->SetCountSubRequestsNoSecurity(no);
}
return true;
}
-// Bug 621446 investigation, we don't want conditional PR_Aborts bellow to be
-// merged to a single address.
-#pragma warning(disable : 4068)
-#pragma GCC optimize ("O0")
-
bool
HttpChannelParent::RecvRedirect2Verify(const nsresult& result,
const RequestHeaderTuples& changedHeaders)
{
if (NS_SUCCEEDED(result)) {
nsCOMPtr<nsIHttpChannel> newHttpChannel =
do_QueryInterface(mRedirectChannel);
@@ -348,40 +339,21 @@ HttpChannelParent::RecvRedirect2Verify(c
for (PRUint32 i = 0; i < changedHeaders.Length(); i++) {
newHttpChannel->SetRequestHeader(changedHeaders[i].mHeader,
changedHeaders[i].mValue,
changedHeaders[i].mMerge);
}
}
}
- if (!mRedirectCallback) {
- // Bug 621446 investigation (optimization turned off above)
- if (mReceivedRedirect2Verify)
- NS_RUNTIMEABORT("Duplicate fire");
- if (mSentRedirect1BeginFailed)
- NS_RUNTIMEABORT("Send to child failed");
- if (mSentRedirect1Begin && NS_FAILED(result))
- NS_RUNTIMEABORT("Redirect failed");
- if (mSentRedirect1Begin && NS_SUCCEEDED(result))
- NS_RUNTIMEABORT("Redirect succeeded");
- if (!mRedirectChannel)
- NS_RUNTIMEABORT("Missing redirect channel");
- }
-
- mReceivedRedirect2Verify = true;
-
mRedirectCallback->OnRedirectVerifyCallback(result);
mRedirectCallback = nsnull;
return true;
}
-// Bug 621446 investigation
-#pragma GCC reset_options
-
bool
HttpChannelParent::RecvDocumentChannelCleanup()
{
// From now on only using mAssociatedContentSecurity. Free everything else.
mChannel = 0; // Reclaim some memory sooner.
mCacheDescriptor = 0; // Else we'll block other channels reading same URI
return true;
}
@@ -583,24 +555,18 @@ HttpChannelParent::StartRedirect(PRUint3
nsHttpChannel *httpChan = static_cast<nsHttpChannel *>(mChannel.get());
nsHttpResponseHead *responseHead = httpChan->GetResponseHead();
bool result = SendRedirect1Begin(newChannelId,
IPC::URI(newURI),
redirectFlags,
responseHead ? *responseHead
: nsHttpResponseHead());
- if (!result) {
- // Bug 621446 investigation
- mSentRedirect1BeginFailed = true;
+ if (!result)
return NS_BINDING_ABORTED;
- }
-
- // Bug 621446 investigation
- mSentRedirect1Begin = true;
// Result is handled in RecvRedirect2Verify above
mRedirectChannel = newChannel;
mRedirectCallback = callback;
return NS_OK;
}
diff --git a/netwerk/protocol/http/HttpChannelParent.h b/netwerk/protocol/http/HttpChannelParent.h
--- a/netwerk/protocol/http/HttpChannelParent.h
+++ b/netwerk/protocol/http/HttpChannelParent.h
@@ -128,18 +128,14 @@ private:
nsCOMPtr<nsIChannel> mRedirectChannel;
nsCOMPtr<nsIAsyncVerifyRedirectCallback> mRedirectCallback;
// state for combining OnStatus/OnProgress with OnDataAvailable
// into one IPDL call to child.
nsresult mStoredStatus;
PRUint64 mStoredProgress;
PRUint64 mStoredProgressMax;
-
- bool mSentRedirect1Begin : 1;
- bool mSentRedirect1BeginFailed : 1;
- bool mReceivedRedirect2Verify : 1;
};
} // namespace net
} // namespace mozilla
#endif // mozilla_net_HttpChannelParent_h