зеркало из https://github.com/mozilla/gecko-dev.git
Completes transistion from ULONG_MAX to PRUint32(-1) which was intended to
fix frizilla redness. pinkerton checked in the necessary ones; this is just for completeness. r=gagan,sdagley,sfraser,pinkerton
This commit is contained in:
Родитель
4e509b68bf
Коммит
dac21e34cd
|
@ -48,7 +48,7 @@ interface nsITransport : nsISupports
|
|||
* Open an input stream on this transport.
|
||||
*
|
||||
* @param offset - read starting at this offset
|
||||
* @param count - read this many bytes (pass ULONG_MAX if unlimited)
|
||||
* @param count - read this many bytes (pass PRUint32(-1) if unlimited)
|
||||
* @param flags - optional transport specific flags
|
||||
*/
|
||||
nsIInputStream openInputStream(in unsigned long offset,
|
||||
|
@ -59,7 +59,7 @@ interface nsITransport : nsISupports
|
|||
* Open an output stream on this transport.
|
||||
*
|
||||
* @param offset - write starting at this offset
|
||||
* @param count - write no more than this many bytes (pass ULONG_MAX if unlimited)
|
||||
* @param count - write no more than this many bytes (pass PRUint32(-1) if unlimited)
|
||||
* @param flags - optional transport specific flags
|
||||
*/
|
||||
nsIOutputStream openOutputStream(in unsigned long offset,
|
||||
|
@ -72,7 +72,7 @@ interface nsITransport : nsISupports
|
|||
* @param listener - notify this listener when data is available
|
||||
* @param ctxt - opaque parameter passed to listener methods
|
||||
* @param offset - read starting at this offset
|
||||
* @param count - read this many bytes (pass ULONG_MAX if unlimited)
|
||||
* @param count - read this many bytes (pass PRUint32(-1) if unlimited)
|
||||
* @param flags - optional transport specific flags
|
||||
*/
|
||||
nsIRequest asyncRead(in nsIStreamListener listener,
|
||||
|
@ -87,7 +87,7 @@ interface nsITransport : nsISupports
|
|||
* @param provider - notify this provider when data can be written
|
||||
* @param ctxt - opaque parameter passed to provider methods
|
||||
* @param offset - write starting at this offset
|
||||
* @param count - write no more than this many bytes (pass ULONG_MAX if unlimited)
|
||||
* @param count - write no more than this many bytes (pass PRUint32(-1) if unlimited)
|
||||
* @param flags - optional transport specific flags
|
||||
*/
|
||||
nsIRequest asyncWrite(in nsIStreamProvider provider,
|
||||
|
|
|
@ -414,7 +414,7 @@ nsFileTransport::OpenInputStream(PRUint32 aTransferOffset,
|
|||
nsIInputStream **aResult)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aResult);
|
||||
NS_ASSERTION(aTransferCount == ULONG_MAX, "need to wrap input stream in one that truncates");
|
||||
NS_ASSERTION(aTransferCount == PRUint32(-1), "need to wrap input stream in one that truncates");
|
||||
|
||||
nsresult rv = mStreamIO->GetInputStream(aResult);
|
||||
if (NS_SUCCEEDED(rv) && aTransferOffset) {
|
||||
|
@ -434,7 +434,7 @@ nsFileTransport::OpenOutputStream(PRUint32 aTransferOffset,
|
|||
nsIOutputStream **aResult)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aResult);
|
||||
NS_ASSERTION(aTransferCount == ULONG_MAX, "need to wrap output stream in one that truncates");
|
||||
NS_ASSERTION(aTransferCount == PRUint32(-1), "need to wrap output stream in one that truncates");
|
||||
|
||||
nsresult rv = mStreamIO->GetOutputStream(aResult);
|
||||
if (NS_SUCCEEDED(rv) && aTransferOffset) {
|
||||
|
|
|
@ -75,7 +75,7 @@ nsAboutCacheEntry::OnCacheEntryAvailable(nsICacheEntryDescriptor *descriptor,
|
|||
nsresult rv;
|
||||
|
||||
// Init: (block size, maximum length)
|
||||
rv = NS_NewStorageStream(256, ULONG_MAX, getter_AddRefs(storageStream));
|
||||
rv = NS_NewStorageStream(256, PRUint32(-1), getter_AddRefs(storageStream));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = storageStream->GetOutputStream(0, getter_AddRefs(outputStream));
|
||||
|
|
|
@ -156,7 +156,7 @@ DataRequestForwarder::DelayedOnStartRequest(nsIRequest *request, nsISupports *ct
|
|||
NS_ASSERTION(0, "Could not create cache transport.");
|
||||
return rv;
|
||||
}
|
||||
rv = transport->OpenOutputStream(0, (PRUint32) ULONG_MAX, 0, getter_AddRefs(mCacheOutputStream));
|
||||
rv = transport->OpenOutputStream(0, PRUint32(-1), 0, getter_AddRefs(mCacheOutputStream));
|
||||
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_ASSERTION(0, "Could not create cache output stream.");
|
||||
|
@ -1521,13 +1521,13 @@ nsFtpState::S_list() {
|
|||
NS_ASSERTION(0, "Could not create cache transport.");
|
||||
return rv;
|
||||
}
|
||||
rv = transport->AsyncRead(forwarder, nsnull, 0, ULONG_MAX, 0, getter_AddRefs(mDPipeRequest));
|
||||
rv = transport->AsyncRead(forwarder, nsnull, 0, PRUint32(-1), 0, getter_AddRefs(mDPipeRequest));
|
||||
return rv;
|
||||
}
|
||||
|
||||
(void) forwarder->SetCacheEntryDescriptor(mCacheEntry);
|
||||
#endif
|
||||
rv = mDPipe->AsyncRead(forwarder, nsnull, 0, ULONG_MAX, 0, getter_AddRefs(mDPipeRequest));
|
||||
rv = mDPipe->AsyncRead(forwarder, nsnull, 0, PRUint32(-1), 0, getter_AddRefs(mDPipeRequest));
|
||||
NS_RELEASE(forwarder); // let the transport worry about this objects lifespan
|
||||
return rv;
|
||||
}
|
||||
|
@ -1560,7 +1560,7 @@ nsFtpState::S_retr() {
|
|||
PR_LOG(gFTPLog, PR_LOG_DEBUG, ("(%x) forwarder->Init failed (rv=%x)\n", this, rv));
|
||||
return rv;
|
||||
}
|
||||
rv = mDPipe->AsyncRead(forwarder, nsnull, 0, ULONG_MAX, 0, getter_AddRefs(mDPipeRequest));
|
||||
rv = mDPipe->AsyncRead(forwarder, nsnull, 0, PRUint32(-1), 0, getter_AddRefs(mDPipeRequest));
|
||||
NS_RELEASE(forwarder); // let the transport worry about this objects lifespan
|
||||
|
||||
return rv;
|
||||
|
@ -2293,7 +2293,7 @@ nsFtpState::CreateTransport(const char * host, PRInt32 port, PRUint32 bufferSegm
|
|||
}
|
||||
}
|
||||
|
||||
return sts->CreateTransport(host, port, nsnull, ULONG_MAX,
|
||||
return sts->CreateTransport(host, port, nsnull, PRUint32(-1),
|
||||
bufferSegmentSize,
|
||||
bufferMaxSize,
|
||||
o_pTrans);
|
||||
|
|
|
@ -1302,7 +1302,7 @@ nsHTTPChannel::ReadFromCache()
|
|||
// Pump the cache data downstream
|
||||
LOG(("\n>>>> Reading from Cache <<<<\n"));
|
||||
rv = mCacheTransport->AsyncRead(listener, mResponseContext,
|
||||
0, ULONG_MAX, 0,
|
||||
0, PRUint32(-1), 0,
|
||||
getter_AddRefs(mCacheReadRequest));
|
||||
|
||||
NS_RELEASE(listener);
|
||||
|
@ -1429,7 +1429,7 @@ nsHTTPChannel::CacheReceivedResponse(nsIStreamListener *aListener,
|
|||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsCOMPtr<nsIOutputStream> out;
|
||||
rv = mCacheTransport->OpenOutputStream(0, ULONG_MAX, 0, getter_AddRefs(out));
|
||||
rv = mCacheTransport->OpenOutputStream(0, PRUint32(-1), 0, getter_AddRefs(out));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
// XXX disk cache does not support overlapped i/o yet
|
||||
|
@ -3082,7 +3082,7 @@ nsHTTPChannel::ProcessNotModifiedResponse(nsIStreamListener *aListener)
|
|||
#ifdef MOZ_NEW_CACHE
|
||||
LOG((">>>> Reading from Cache <<<<\n"));
|
||||
rv = mCacheTransport->AsyncRead(cacheListener, mResponseContext,
|
||||
0, ULONG_MAX, 0,
|
||||
0, PRUint32(-1), 0,
|
||||
getter_AddRefs(mCacheReadRequest));
|
||||
#else
|
||||
rv = mCacheChannel->AsyncOpen(cacheListener, mResponseContext);
|
||||
|
|
Загрузка…
Ссылка в новой задаче