Back out the patch for bug 235853, again, because of mochi*chrome* failures this time.

This commit is contained in:
gavin@gavinsharp.com 2008-04-17 19:49:40 -07:00
Родитель f724ca6c81
Коммит 8f60006524
5 изменённых файлов: 7 добавлений и 39 удалений

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

@ -6,7 +6,7 @@
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head> </head>
<body onload="setupTest('http://example.org/tests/extensions/cookie/test/file_loadflags_inner.html', 'example.org', 5, 1, 4)"> <body onload="setupTest('http://example.org/tests/extensions/cookie/test/file_loadflags_inner.html', 'example.org', 5, 1, 2)">
<p id="display"></p> <p id="display"></p>
<pre id="test"> <pre id="test">
<script class="testbody" type="text/javascript" src="file_testloadflags.js"> <script class="testbody" type="text/javascript" src="file_testloadflags.js">

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

@ -550,17 +550,7 @@ nsIOService::NewChannelFromURI(nsIURI *aURI, nsIChannel **result)
NS_WARNING("failed to get protocol proxy service"); NS_WARNING("failed to get protocol proxy service");
} }
if (mProxyService) { if (mProxyService) {
PRUint32 flags = 0; rv = mProxyService->Resolve(aURI, 0, getter_AddRefs(pi));
if (scheme.EqualsLiteral("http") || scheme.EqualsLiteral("https"))
flags = nsIProtocolProxyService::RESOLVE_NON_BLOCKING;
rv = mProxyService->Resolve(aURI, flags, getter_AddRefs(pi));
if (rv == NS_BASE_STREAM_WOULD_BLOCK) {
// Use an UNKNOWN proxy to defer resolution and avoid blocking.
rv = mProxyService->NewProxyInfo(NS_LITERAL_CSTRING("unknown"),
NS_LITERAL_CSTRING(""),
-1, 0, 0, nsnull,
getter_AddRefs(pi));
}
if (NS_FAILED(rv)) if (NS_FAILED(rv))
pi = nsnull; pi = nsnull;
} }

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

@ -923,8 +923,7 @@ nsProtocolProxyService::NewProxyInfo(const nsACString &aType,
kProxyType_HTTP, kProxyType_HTTP,
kProxyType_SOCKS, kProxyType_SOCKS,
kProxyType_SOCKS4, kProxyType_SOCKS4,
kProxyType_DIRECT, kProxyType_DIRECT
kProxyType_UNKNOWN
}; };
// resolve type; this allows us to avoid copying the type string into each // resolve type; this allows us to avoid copying the type string into each

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

@ -1060,7 +1060,7 @@ nsHttpChannel::DoReplaceWithProxy(nsIProxyInfo* pi)
if (NS_FAILED(rv)) if (NS_FAILED(rv))
return rv; return rv;
rv = SetupReplacementChannel(mURI, newChannel, PR_TRUE, PR_TRUE); rv = SetupReplacementChannel(mURI, newChannel, PR_TRUE);
if (NS_FAILED(rv)) if (NS_FAILED(rv))
return rv; return rv;
@ -2249,8 +2249,7 @@ CopyProperties(const nsAString& aKey, nsIVariant *aData, void *aClosure)
nsresult nsresult
nsHttpChannel::SetupReplacementChannel(nsIURI *newURI, nsHttpChannel::SetupReplacementChannel(nsIURI *newURI,
nsIChannel *newChannel, nsIChannel *newChannel,
PRBool preserveMethod, PRBool preserveMethod)
PRBool transferCacheInfo)
{ {
PRUint32 newLoadFlags = mLoadFlags | LOAD_REPLACE; PRUint32 newLoadFlags = mLoadFlags | LOAD_REPLACE;
// if the original channel was using SSL and this channel is not using // if the original channel was using SSL and this channel is not using
@ -2335,26 +2334,6 @@ nsHttpChannel::SetupReplacementChannel(nsIURI *newURI,
if (bag) if (bag)
mPropertyHash.EnumerateRead(CopyProperties, bag.get()); mPropertyHash.EnumerateRead(CopyProperties, bag.get());
// Transfer the cache info to the new channel, if needed.
if (transferCacheInfo) {
nsCOMPtr<nsICachingChannel> cachingChannel = do_QueryInterface(newChannel);
if (cachingChannel) {
// cacheKey is just mPostID wrapped in an nsISupportsPRUint32,
// we don't need to transfer it if it's 0.
if (mPostID) {
nsCOMPtr<nsISupports> cacheKey;
GetCacheKey(getter_AddRefs(cacheKey));
if (cacheKey) {
cachingChannel->SetCacheKey(cacheKey);
}
}
// cacheClientID, cacheForOfflineUse
cachingChannel->SetOfflineCacheClientID(mOfflineCacheClientID);
cachingChannel->SetCacheForOfflineUse(mCacheForOfflineUse);
}
}
return NS_OK; return NS_OK;
} }
@ -2440,7 +2419,7 @@ nsHttpChannel::ProcessRedirection(PRUint32 redirectType)
rv = ioService->NewChannelFromURI(newURI, getter_AddRefs(newChannel)); rv = ioService->NewChannelFromURI(newURI, getter_AddRefs(newChannel));
if (NS_FAILED(rv)) return rv; if (NS_FAILED(rv)) return rv;
rv = SetupReplacementChannel(newURI, newChannel, preserveMethod, PR_FALSE); rv = SetupReplacementChannel(newURI, newChannel, preserveMethod);
if (NS_FAILED(rv)) return rv; if (NS_FAILED(rv)) return rv;
PRUint32 redirectFlags; PRUint32 redirectFlags;

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

@ -167,7 +167,7 @@ private:
void HandleAsyncRedirect(); void HandleAsyncRedirect();
void HandleAsyncNotModified(); void HandleAsyncNotModified();
nsresult PromptTempRedirect(); nsresult PromptTempRedirect();
nsresult SetupReplacementChannel(nsIURI *, nsIChannel *, PRBool preserveMethod, PRBool transferCacheInfo); nsresult SetupReplacementChannel(nsIURI *, nsIChannel *, PRBool preserveMethod);
// proxy specific methods // proxy specific methods
nsresult ProxyFailover(); nsresult ProxyFailover();