зеркало из https://github.com/mozilla/pjs.git
Bug 646071 - Part 3: Remove nsInt64.h, and convert all uses of nsInt64 and nsUint64 in the tree to PRInt64 and PRUint64, respectively; r=bsmedberg
This commit is contained in:
Родитель
2dc570da46
Коммит
8be93d2df6
|
@ -60,7 +60,6 @@
|
||||||
#include "nsCRT.h"
|
#include "nsCRT.h"
|
||||||
#include "prtime.h"
|
#include "prtime.h"
|
||||||
#include "prlog.h"
|
#include "prlog.h"
|
||||||
#include "nsInt64.h"
|
|
||||||
#include "nsNodeUtils.h"
|
#include "nsNodeUtils.h"
|
||||||
#include "nsIContent.h"
|
#include "nsIContent.h"
|
||||||
#include "mozilla/dom/Element.h"
|
#include "mozilla/dom/Element.h"
|
||||||
|
|
|
@ -62,7 +62,6 @@
|
||||||
#include "nsIStringEnumerator.h"
|
#include "nsIStringEnumerator.h"
|
||||||
#include "nsCRT.h"
|
#include "nsCRT.h"
|
||||||
#include "nsSupportsArray.h"
|
#include "nsSupportsArray.h"
|
||||||
#include "nsInt64.h"
|
|
||||||
#include "nsContentCID.h"
|
#include "nsContentCID.h"
|
||||||
#include "nsStreamUtils.h"
|
#include "nsStreamUtils.h"
|
||||||
|
|
||||||
|
@ -168,8 +167,8 @@ struct OutputData
|
||||||
nsCOMPtr<nsIURI> mFile;
|
nsCOMPtr<nsIURI> mFile;
|
||||||
nsCOMPtr<nsIURI> mOriginalLocation;
|
nsCOMPtr<nsIURI> mOriginalLocation;
|
||||||
nsCOMPtr<nsIOutputStream> mStream;
|
nsCOMPtr<nsIOutputStream> mStream;
|
||||||
nsInt64 mSelfProgress;
|
PRInt64 mSelfProgress;
|
||||||
nsInt64 mSelfProgressMax;
|
PRInt64 mSelfProgressMax;
|
||||||
PRPackedBool mCalcFileExt;
|
PRPackedBool mCalcFileExt;
|
||||||
|
|
||||||
OutputData(nsIURI *aFile, nsIURI *aOriginalLocation, PRBool aCalcFileExt) :
|
OutputData(nsIURI *aFile, nsIURI *aOriginalLocation, PRBool aCalcFileExt) :
|
||||||
|
@ -192,8 +191,8 @@ struct OutputData
|
||||||
struct UploadData
|
struct UploadData
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsIURI> mFile;
|
nsCOMPtr<nsIURI> mFile;
|
||||||
nsInt64 mSelfProgress;
|
PRInt64 mSelfProgress;
|
||||||
nsInt64 mSelfProgressMax;
|
PRInt64 mSelfProgressMax;
|
||||||
|
|
||||||
UploadData(nsIURI *aFile) :
|
UploadData(nsIURI *aFile) :
|
||||||
mFile(aFile),
|
mFile(aFile),
|
||||||
|
@ -244,6 +243,8 @@ nsWebBrowserPersist::nsWebBrowserPersist() :
|
||||||
mPersistFlags(kDefaultPersistFlags),
|
mPersistFlags(kDefaultPersistFlags),
|
||||||
mPersistResult(NS_OK),
|
mPersistResult(NS_OK),
|
||||||
mWrapColumn(72),
|
mWrapColumn(72),
|
||||||
|
mTotalCurrentProgress(0),
|
||||||
|
mTotalMaxProgress(0),
|
||||||
mEncodingFlags(0)
|
mEncodingFlags(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,6 @@
|
||||||
|
|
||||||
#include "nsHashtable.h"
|
#include "nsHashtable.h"
|
||||||
#include "nsTArray.h"
|
#include "nsTArray.h"
|
||||||
#include "nsInt64.h"
|
|
||||||
|
|
||||||
#include "nsCWebBrowserPersist.h"
|
#include "nsCWebBrowserPersist.h"
|
||||||
|
|
||||||
|
@ -240,8 +239,8 @@ private:
|
||||||
PRPackedBool mSerializingOutput;
|
PRPackedBool mSerializingOutput;
|
||||||
PRUint32 mPersistFlags;
|
PRUint32 mPersistFlags;
|
||||||
PRUint32 mPersistResult;
|
PRUint32 mPersistResult;
|
||||||
nsInt64 mTotalCurrentProgress;
|
PRInt64 mTotalCurrentProgress;
|
||||||
nsInt64 mTotalMaxProgress;
|
PRInt64 mTotalMaxProgress;
|
||||||
PRInt16 mWrapColumn;
|
PRInt16 mWrapColumn;
|
||||||
PRUint32 mEncodingFlags;
|
PRUint32 mEncodingFlags;
|
||||||
nsString mContentType;
|
nsString mContentType;
|
||||||
|
|
|
@ -42,7 +42,6 @@
|
||||||
#include "nsJARProtocolHandler.h"
|
#include "nsJARProtocolHandler.h"
|
||||||
#include "nsMimeTypes.h"
|
#include "nsMimeTypes.h"
|
||||||
#include "nsNetUtil.h"
|
#include "nsNetUtil.h"
|
||||||
#include "nsInt64.h"
|
|
||||||
#include "nsEscape.h"
|
#include "nsEscape.h"
|
||||||
#include "nsIPrefService.h"
|
#include "nsIPrefService.h"
|
||||||
#include "nsIPrefBranch.h"
|
#include "nsIPrefBranch.h"
|
||||||
|
|
|
@ -56,7 +56,6 @@
|
||||||
#include "plstr.h"
|
#include "plstr.h"
|
||||||
#include "nsILocalFileMac.h"
|
#include "nsILocalFileMac.h"
|
||||||
#include "nsIFileURL.h"
|
#include "nsIFileURL.h"
|
||||||
#include "nsInt64.h"
|
|
||||||
#include "nsTArray.h"
|
#include "nsTArray.h"
|
||||||
#include "nsObjCExceptions.h"
|
#include "nsObjCExceptions.h"
|
||||||
|
|
||||||
|
@ -220,7 +219,7 @@ NS_IMETHODIMP nsIconChannel::AsyncOpen(nsIStreamListener *aListener, nsISupports
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
// Init our stream pump
|
// Init our stream pump
|
||||||
rv = mPump->Init(inStream, nsInt64(-1), nsInt64(-1), 0, 0, PR_FALSE);
|
rv = mPump->Init(inStream, PRInt64(-1), PRInt64(-1), 0, 0, PR_FALSE);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
rv = mPump->AsyncRead(this, ctxt);
|
rv = mPump->AsyncRead(this, ctxt);
|
||||||
|
|
|
@ -47,7 +47,6 @@
|
||||||
#include "nsReadableUtils.h"
|
#include "nsReadableUtils.h"
|
||||||
#include "nsMemory.h"
|
#include "nsMemory.h"
|
||||||
#include "nsNetUtil.h"
|
#include "nsNetUtil.h"
|
||||||
#include "nsInt64.h"
|
|
||||||
#include "nsILocalFile.h"
|
#include "nsILocalFile.h"
|
||||||
#include "nsIFileURL.h"
|
#include "nsIFileURL.h"
|
||||||
#include "nsDirectoryServiceDefs.h"
|
#include "nsDirectoryServiceDefs.h"
|
||||||
|
@ -203,7 +202,7 @@ NS_IMETHODIMP nsIconChannel::AsyncOpen(nsIStreamListener *aListener, nsISupports
|
||||||
return rv;
|
return rv;
|
||||||
|
|
||||||
// Init our streampump
|
// Init our streampump
|
||||||
rv = mPump->Init(inStream, nsInt64(-1), nsInt64(-1), 0, 0, PR_FALSE);
|
rv = mPump->Init(inStream, PRInt64(-1), PRInt64(-1), 0, 0, PR_FALSE);
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,6 @@
|
||||||
#include "nsIStringStream.h"
|
#include "nsIStringStream.h"
|
||||||
#include "nsIURL.h"
|
#include "nsIURL.h"
|
||||||
#include "nsNetUtil.h"
|
#include "nsNetUtil.h"
|
||||||
#include "nsInt64.h"
|
|
||||||
#include "nsIFile.h"
|
#include "nsIFile.h"
|
||||||
#include "nsIFileURL.h"
|
#include "nsIFileURL.h"
|
||||||
#include "nsIMIMEService.h"
|
#include "nsIMIMEService.h"
|
||||||
|
@ -249,7 +248,7 @@ NS_IMETHODIMP nsIconChannel::AsyncOpen(nsIStreamListener *aListener, nsISupports
|
||||||
return rv;
|
return rv;
|
||||||
|
|
||||||
// Init our streampump
|
// Init our streampump
|
||||||
rv = mPump->Init(inStream, nsInt64(-1), nsInt64(-1), 0, 0, PR_FALSE);
|
rv = mPump->Init(inStream, PRInt64(-1), PRInt64(-1), 0, 0, PR_FALSE);
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,6 @@
|
||||||
#include "nsAppDirectoryServiceDefs.h"
|
#include "nsAppDirectoryServiceDefs.h"
|
||||||
#include "nsIFile.h"
|
#include "nsIFile.h"
|
||||||
#include "nsPluginDirServiceProvider.h"
|
#include "nsPluginDirServiceProvider.h"
|
||||||
#include "nsInt64.h"
|
|
||||||
#include "nsPluginError.h"
|
#include "nsPluginError.h"
|
||||||
|
|
||||||
#include "nsUnicharUtils.h"
|
#include "nsUnicharUtils.h"
|
||||||
|
@ -2949,7 +2948,7 @@ nsPluginHost::ReadPluginInfo()
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
|
||||||
PRInt32 flen = nsInt64(fileSize);
|
PRInt32 flen = PRInt64(fileSize);
|
||||||
if (flen == 0) {
|
if (flen == 0) {
|
||||||
NS_WARNING("Plugins Registry Empty!");
|
NS_WARNING("Plugins Registry Empty!");
|
||||||
return NS_OK; // ERROR CONDITION
|
return NS_OK; // ERROR CONDITION
|
||||||
|
|
|
@ -969,7 +969,7 @@ NS_IMETHODIMP nsPluginStreamListenerPeer::OnDataAvailable(nsIRequest *request,
|
||||||
brr->GetStartRange(&absoluteOffset64);
|
brr->GetStartRange(&absoluteOffset64);
|
||||||
|
|
||||||
// XXX handle 64-bit for real
|
// XXX handle 64-bit for real
|
||||||
PRInt32 absoluteOffset = (PRInt32)nsInt64(absoluteOffset64);
|
PRInt32 absoluteOffset = (PRInt32)PRInt64(absoluteOffset64);
|
||||||
|
|
||||||
// we need to track how much data we have forwarded to the
|
// we need to track how much data we have forwarded to the
|
||||||
// plugin.
|
// plugin.
|
||||||
|
@ -1049,7 +1049,7 @@ NS_IMETHODIMP nsPluginStreamListenerPeer::OnStopRequest(nsIRequest *request,
|
||||||
PRInt64 absoluteOffset64 = LL_ZERO;
|
PRInt64 absoluteOffset64 = LL_ZERO;
|
||||||
brr->GetStartRange(&absoluteOffset64);
|
brr->GetStartRange(&absoluteOffset64);
|
||||||
// XXX support 64-bit offsets
|
// XXX support 64-bit offsets
|
||||||
PRInt32 absoluteOffset = (PRInt32)nsInt64(absoluteOffset64);
|
PRInt32 absoluteOffset = (PRInt32)PRInt64(absoluteOffset64);
|
||||||
|
|
||||||
nsPRUintKey key(absoluteOffset);
|
nsPRUintKey key(absoluteOffset);
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,6 @@
|
||||||
#include "nsIPersistentProperties2.h"
|
#include "nsIPersistentProperties2.h"
|
||||||
#include "nsISyncStreamListener.h"
|
#include "nsISyncStreamListener.h"
|
||||||
#include "nsInterfaceRequestorAgg.h"
|
#include "nsInterfaceRequestorAgg.h"
|
||||||
#include "nsInt64.h"
|
|
||||||
#include "nsINetUtil.h"
|
#include "nsINetUtil.h"
|
||||||
#include "nsIURIWithPrincipal.h"
|
#include "nsIURIWithPrincipal.h"
|
||||||
#include "nsIAuthPrompt.h"
|
#include "nsIAuthPrompt.h"
|
||||||
|
@ -490,8 +489,8 @@ NS_NewInputStreamChannel(nsIChannel **result,
|
||||||
inline nsresult
|
inline nsresult
|
||||||
NS_NewInputStreamPump(nsIInputStreamPump **result,
|
NS_NewInputStreamPump(nsIInputStreamPump **result,
|
||||||
nsIInputStream *stream,
|
nsIInputStream *stream,
|
||||||
PRInt64 streamPos = nsInt64(-1),
|
PRInt64 streamPos = PRInt64(-1),
|
||||||
PRInt64 streamLen = nsInt64(-1),
|
PRInt64 streamLen = PRInt64(-1),
|
||||||
PRUint32 segsize = 0,
|
PRUint32 segsize = 0,
|
||||||
PRUint32 segcount = 0,
|
PRUint32 segcount = 0,
|
||||||
PRBool closeWhenDone = PR_FALSE)
|
PRBool closeWhenDone = PR_FALSE)
|
||||||
|
@ -1040,7 +1039,7 @@ NS_BackgroundInputStream(nsIInputStream **result,
|
||||||
do_GetService(NS_STREAMTRANSPORTSERVICE_CONTRACTID, &rv);
|
do_GetService(NS_STREAMTRANSPORTSERVICE_CONTRACTID, &rv);
|
||||||
if (NS_SUCCEEDED(rv)) {
|
if (NS_SUCCEEDED(rv)) {
|
||||||
nsCOMPtr<nsITransport> inTransport;
|
nsCOMPtr<nsITransport> inTransport;
|
||||||
rv = sts->CreateInputTransport(stream, nsInt64(-1), nsInt64(-1),
|
rv = sts->CreateInputTransport(stream, PRInt64(-1), PRInt64(-1),
|
||||||
PR_TRUE, getter_AddRefs(inTransport));
|
PR_TRUE, getter_AddRefs(inTransport));
|
||||||
if (NS_SUCCEEDED(rv))
|
if (NS_SUCCEEDED(rv))
|
||||||
rv = inTransport->OpenInputStream(nsITransport::OPEN_BLOCKING,
|
rv = inTransport->OpenInputStream(nsITransport::OPEN_BLOCKING,
|
||||||
|
@ -1064,7 +1063,7 @@ NS_BackgroundOutputStream(nsIOutputStream **result,
|
||||||
do_GetService(NS_STREAMTRANSPORTSERVICE_CONTRACTID, &rv);
|
do_GetService(NS_STREAMTRANSPORTSERVICE_CONTRACTID, &rv);
|
||||||
if (NS_SUCCEEDED(rv)) {
|
if (NS_SUCCEEDED(rv)) {
|
||||||
nsCOMPtr<nsITransport> inTransport;
|
nsCOMPtr<nsITransport> inTransport;
|
||||||
rv = sts->CreateOutputTransport(stream, nsInt64(-1), nsInt64(-1),
|
rv = sts->CreateOutputTransport(stream, PRInt64(-1), PRInt64(-1),
|
||||||
PR_TRUE, getter_AddRefs(inTransport));
|
PR_TRUE, getter_AddRefs(inTransport));
|
||||||
if (NS_SUCCEEDED(rv))
|
if (NS_SUCCEEDED(rv))
|
||||||
rv = inTransport->OpenOutputStream(nsITransport::OPEN_BLOCKING,
|
rv = inTransport->OpenOutputStream(nsITransport::OPEN_BLOCKING,
|
||||||
|
|
|
@ -165,7 +165,7 @@ nsBufferedStream::Seek(PRInt32 whence, PRInt64 offset)
|
||||||
nsCOMPtr<nsISeekableStream> ras = do_QueryInterface(mStream, &rv);
|
nsCOMPtr<nsISeekableStream> ras = do_QueryInterface(mStream, &rv);
|
||||||
if (NS_FAILED(rv)) return rv;
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
|
||||||
nsInt64 absPos;
|
PRInt64 absPos = 0;
|
||||||
switch (whence) {
|
switch (whence) {
|
||||||
case nsISeekableStream::NS_SEEK_SET:
|
case nsISeekableStream::NS_SEEK_SET:
|
||||||
absPos = offset;
|
absPos = offset;
|
||||||
|
@ -205,8 +205,8 @@ nsBufferedStream::Seek(PRInt32 whence, PRInt64 offset)
|
||||||
|
|
||||||
METER(if (bufstats.mBigSeekIndex < MAX_BIG_SEEKS)
|
METER(if (bufstats.mBigSeekIndex < MAX_BIG_SEEKS)
|
||||||
bufstats.mBigSeek[bufstats.mBigSeekIndex].mOldOffset =
|
bufstats.mBigSeek[bufstats.mBigSeekIndex].mOldOffset =
|
||||||
mBufferStartOffset + nsInt64(mCursor));
|
mBufferStartOffset + PRInt64(mCursor));
|
||||||
const nsInt64 minus1 = -1;
|
const PRInt64 minus1 = -1;
|
||||||
if (absPos == minus1) {
|
if (absPos == minus1) {
|
||||||
// then we had the SEEK_END case, above
|
// then we had the SEEK_END case, above
|
||||||
PRInt64 tellPos;
|
PRInt64 tellPos;
|
||||||
|
@ -231,7 +231,7 @@ nsBufferedStream::Tell(PRInt64 *result)
|
||||||
if (mStream == nsnull)
|
if (mStream == nsnull)
|
||||||
return NS_BASE_STREAM_CLOSED;
|
return NS_BASE_STREAM_CLOSED;
|
||||||
|
|
||||||
nsInt64 result64 = mBufferStartOffset;
|
PRInt64 result64 = mBufferStartOffset;
|
||||||
result64 += mCursor;
|
result64 += mCursor;
|
||||||
*result = result64;
|
*result = result64;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
|
@ -45,7 +45,6 @@
|
||||||
#include "nsISeekableStream.h"
|
#include "nsISeekableStream.h"
|
||||||
#include "nsIStreamBufferAccess.h"
|
#include "nsIStreamBufferAccess.h"
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "nsInt64.h"
|
|
||||||
#include "nsIIPCSerializable.h"
|
#include "nsIIPCSerializable.h"
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -70,7 +69,7 @@ protected:
|
||||||
char* mBuffer;
|
char* mBuffer;
|
||||||
|
|
||||||
// mBufferStartOffset is the offset relative to the start of mStream.
|
// mBufferStartOffset is the offset relative to the start of mStream.
|
||||||
nsInt64 mBufferStartOffset;
|
PRInt64 mBufferStartOffset;
|
||||||
|
|
||||||
// mCursor is the read cursor for input streams, or write cursor for
|
// mCursor is the read cursor for input streams, or write cursor for
|
||||||
// output streams, and is relative to mBufferStartOffset.
|
// output streams, and is relative to mBufferStartOffset.
|
||||||
|
|
|
@ -57,7 +57,6 @@
|
||||||
#include "nsXPIDLString.h"
|
#include "nsXPIDLString.h"
|
||||||
#include "prerror.h"
|
#include "prerror.h"
|
||||||
#include "nsCRT.h"
|
#include "nsCRT.h"
|
||||||
#include "nsInt64.h"
|
|
||||||
#include "nsIFile.h"
|
#include "nsIFile.h"
|
||||||
#include "nsDirectoryIndexStream.h"
|
#include "nsDirectoryIndexStream.h"
|
||||||
#include "nsMimeTypes.h"
|
#include "nsMimeTypes.h"
|
||||||
|
@ -107,8 +106,8 @@ nsFileStream::Seek(PRInt32 whence, PRInt64 offset)
|
||||||
if (mFD == nsnull)
|
if (mFD == nsnull)
|
||||||
return NS_BASE_STREAM_CLOSED;
|
return NS_BASE_STREAM_CLOSED;
|
||||||
|
|
||||||
nsInt64 cnt = PR_Seek64(mFD, offset, (PRSeekWhence)whence);
|
PRInt64 cnt = PR_Seek64(mFD, offset, (PRSeekWhence)whence);
|
||||||
if (cnt == nsInt64(-1)) {
|
if (cnt == PRInt64(-1)) {
|
||||||
return NS_ErrorAccordingToNSPR();
|
return NS_ErrorAccordingToNSPR();
|
||||||
}
|
}
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
@ -123,8 +122,8 @@ nsFileStream::Tell(PRInt64 *result)
|
||||||
if (mFD == nsnull)
|
if (mFD == nsnull)
|
||||||
return NS_BASE_STREAM_CLOSED;
|
return NS_BASE_STREAM_CLOSED;
|
||||||
|
|
||||||
nsInt64 cnt = PR_Seek64(mFD, 0, PR_SEEK_CUR);
|
PRInt64 cnt = PR_Seek64(mFD, 0, PR_SEEK_CUR);
|
||||||
if (cnt == nsInt64(-1)) {
|
if (cnt == PRInt64(-1)) {
|
||||||
return NS_ErrorAccordingToNSPR();
|
return NS_ErrorAccordingToNSPR();
|
||||||
}
|
}
|
||||||
*result = cnt;
|
*result = cnt;
|
||||||
|
|
|
@ -48,7 +48,6 @@
|
||||||
#include "nsIServiceManager.h"
|
#include "nsIServiceManager.h"
|
||||||
#include "nsILocalFile.h"
|
#include "nsILocalFile.h"
|
||||||
#include "nsITimer.h"
|
#include "nsITimer.h"
|
||||||
#include "nsInt64.h"
|
|
||||||
#include "nsNetUtil.h"
|
#include "nsNetUtil.h"
|
||||||
#include "nsAutoPtr.h"
|
#include "nsAutoPtr.h"
|
||||||
#include "nsWeakReference.h"
|
#include "nsWeakReference.h"
|
||||||
|
@ -101,7 +100,7 @@ AppendToFile(nsILocalFile *lf, const char *data, PRUint32 len)
|
||||||
|
|
||||||
// maxSize may be -1 if unknown
|
// maxSize may be -1 if unknown
|
||||||
static void
|
static void
|
||||||
MakeRangeSpec(const nsInt64 &size, const nsInt64 &maxSize, PRInt32 chunkSize,
|
MakeRangeSpec(const PRInt64 &size, const PRInt64 &maxSize, PRInt32 chunkSize,
|
||||||
PRBool fetchRemaining, nsCString &rangeSpec)
|
PRBool fetchRemaining, nsCString &rangeSpec)
|
||||||
{
|
{
|
||||||
rangeSpec.AssignLiteral("bytes=");
|
rangeSpec.AssignLiteral("bytes=");
|
||||||
|
@ -111,8 +110,8 @@ MakeRangeSpec(const nsInt64 &size, const nsInt64 &maxSize, PRInt32 chunkSize,
|
||||||
if (fetchRemaining)
|
if (fetchRemaining)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
nsInt64 end = size + nsInt64(chunkSize);
|
PRInt64 end = size + PRInt64(chunkSize);
|
||||||
if (maxSize != nsInt64(-1) && end > maxSize)
|
if (maxSize != PRInt64(-1) && end > maxSize)
|
||||||
end = maxSize;
|
end = maxSize;
|
||||||
end -= 1;
|
end -= 1;
|
||||||
|
|
||||||
|
@ -165,8 +164,8 @@ private:
|
||||||
PRInt32 mChunkLen;
|
PRInt32 mChunkLen;
|
||||||
PRInt32 mChunkSize;
|
PRInt32 mChunkSize;
|
||||||
PRInt32 mInterval;
|
PRInt32 mInterval;
|
||||||
nsInt64 mTotalSize;
|
PRInt64 mTotalSize;
|
||||||
nsInt64 mCurrentSize;
|
PRInt64 mCurrentSize;
|
||||||
PRUint32 mLoadFlags;
|
PRUint32 mLoadFlags;
|
||||||
PRInt32 mNonPartialCount;
|
PRInt32 mNonPartialCount;
|
||||||
nsresult mStatus;
|
nsresult mStatus;
|
||||||
|
@ -197,7 +196,7 @@ nsIncrementalDownload::nsIncrementalDownload()
|
||||||
nsresult
|
nsresult
|
||||||
nsIncrementalDownload::FlushChunk()
|
nsIncrementalDownload::FlushChunk()
|
||||||
{
|
{
|
||||||
NS_ASSERTION(mTotalSize != nsInt64(-1), "total size should be known");
|
NS_ASSERTION(mTotalSize != PRInt64(-1), "total size should be known");
|
||||||
|
|
||||||
if (mChunkLen == 0)
|
if (mChunkLen == 0)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
@ -206,7 +205,7 @@ nsIncrementalDownload::FlushChunk()
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
|
||||||
mCurrentSize += nsInt64(mChunkLen);
|
mCurrentSize += PRInt64(mChunkLen);
|
||||||
mChunkLen = 0;
|
mChunkLen = 0;
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
@ -285,7 +284,7 @@ nsIncrementalDownload::ProcessTimeout()
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
return rv;
|
return rv;
|
||||||
|
|
||||||
NS_ASSERTION(mCurrentSize != nsInt64(-1),
|
NS_ASSERTION(mCurrentSize != PRInt64(-1),
|
||||||
"we should know the current file size by now");
|
"we should know the current file size by now");
|
||||||
|
|
||||||
rv = ClearRequestHeader(http);
|
rv = ClearRequestHeader(http);
|
||||||
|
@ -294,7 +293,7 @@ nsIncrementalDownload::ProcessTimeout()
|
||||||
|
|
||||||
// Don't bother making a range request if we are just going to fetch the
|
// Don't bother making a range request if we are just going to fetch the
|
||||||
// entire document.
|
// entire document.
|
||||||
if (mInterval || mCurrentSize != nsInt64(0)) {
|
if (mInterval || mCurrentSize != PRInt64(0)) {
|
||||||
nsCAutoString range;
|
nsCAutoString range;
|
||||||
MakeRangeSpec(mCurrentSize, mTotalSize, mChunkSize, mInterval == 0, range);
|
MakeRangeSpec(mCurrentSize, mTotalSize, mChunkSize, mInterval == 0, range);
|
||||||
|
|
||||||
|
@ -319,7 +318,7 @@ nsIncrementalDownload::ProcessTimeout()
|
||||||
nsresult
|
nsresult
|
||||||
nsIncrementalDownload::ReadCurrentSize()
|
nsIncrementalDownload::ReadCurrentSize()
|
||||||
{
|
{
|
||||||
nsInt64 size;
|
PRInt64 size;
|
||||||
nsresult rv = mDest->GetFileSize((PRInt64 *) &size);
|
nsresult rv = mDest->GetFileSize((PRInt64 *) &size);
|
||||||
if (rv == NS_ERROR_FILE_NOT_FOUND ||
|
if (rv == NS_ERROR_FILE_NOT_FOUND ||
|
||||||
rv == NS_ERROR_FILE_TARGET_DOES_NOT_EXIST) {
|
rv == NS_ERROR_FILE_TARGET_DOES_NOT_EXIST) {
|
||||||
|
@ -553,7 +552,7 @@ nsIncrementalDownload::OnStartRequest(nsIRequest *request,
|
||||||
// We may already have the entire file downloaded, in which case
|
// We may already have the entire file downloaded, in which case
|
||||||
// our request for a range beyond the end of the file would have
|
// our request for a range beyond the end of the file would have
|
||||||
// been met with an error response code.
|
// been met with an error response code.
|
||||||
if (code == 416 && mTotalSize == nsInt64(-1)) {
|
if (code == 416 && mTotalSize == PRInt64(-1)) {
|
||||||
mTotalSize = mCurrentSize;
|
mTotalSize = mCurrentSize;
|
||||||
// Return an error code here to suppress OnDataAvailable.
|
// Return an error code here to suppress OnDataAvailable.
|
||||||
return NS_ERROR_DOWNLOAD_COMPLETE;
|
return NS_ERROR_DOWNLOAD_COMPLETE;
|
||||||
|
@ -587,7 +586,7 @@ nsIncrementalDownload::OnStartRequest(nsIRequest *request,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do special processing after the first response.
|
// Do special processing after the first response.
|
||||||
if (mTotalSize == nsInt64(-1)) {
|
if (mTotalSize == PRInt64(-1)) {
|
||||||
// Update knowledge of mFinalURI
|
// Update knowledge of mFinalURI
|
||||||
rv = http->GetURI(getter_AddRefs(mFinalURI));
|
rv = http->GetURI(getter_AddRefs(mFinalURI));
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
|
@ -616,7 +615,7 @@ nsIncrementalDownload::OnStartRequest(nsIRequest *request,
|
||||||
rv = props->GetPropertyAsInt64(NS_CHANNEL_PROP_CONTENT_LENGTH,
|
rv = props->GetPropertyAsInt64(NS_CHANNEL_PROP_CONTENT_LENGTH,
|
||||||
&mTotalSize);
|
&mTotalSize);
|
||||||
// We need to know the total size of the thing we're trying to download.
|
// We need to know the total size of the thing we're trying to download.
|
||||||
if (mTotalSize == nsInt64(-1)) {
|
if (mTotalSize == PRInt64(-1)) {
|
||||||
NS_WARNING("server returned no content-length header!");
|
NS_WARNING("server returned no content-length header!");
|
||||||
return NS_ERROR_UNEXPECTED;
|
return NS_ERROR_UNEXPECTED;
|
||||||
}
|
}
|
||||||
|
@ -633,13 +632,13 @@ nsIncrementalDownload::OnStartRequest(nsIRequest *request,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adjust mChunkSize accordingly if mCurrentSize is close to mTotalSize.
|
// Adjust mChunkSize accordingly if mCurrentSize is close to mTotalSize.
|
||||||
nsInt64 diff = mTotalSize - mCurrentSize;
|
PRInt64 diff = mTotalSize - mCurrentSize;
|
||||||
if (diff <= nsInt64(0)) {
|
if (diff <= PRInt64(0)) {
|
||||||
NS_WARNING("about to set a bogus chunk size; giving up");
|
NS_WARNING("about to set a bogus chunk size; giving up");
|
||||||
return NS_ERROR_UNEXPECTED;
|
return NS_ERROR_UNEXPECTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (diff < nsInt64(mChunkSize))
|
if (diff < PRInt64(mChunkSize))
|
||||||
mChunkSize = PRUint32(diff);
|
mChunkSize = PRUint32(diff);
|
||||||
|
|
||||||
mChunk = new char[mChunkSize];
|
mChunk = new char[mChunkSize];
|
||||||
|
|
|
@ -287,7 +287,7 @@ nsInputStreamPump::Init(nsIInputStream *stream,
|
||||||
NS_ENSURE_TRUE(mState == STATE_IDLE, NS_ERROR_IN_PROGRESS);
|
NS_ENSURE_TRUE(mState == STATE_IDLE, NS_ERROR_IN_PROGRESS);
|
||||||
|
|
||||||
mStreamOffset = PRUint64(streamPos);
|
mStreamOffset = PRUint64(streamPos);
|
||||||
if (nsInt64(streamLen) >= nsInt64(0))
|
if (PRInt64(streamLen) >= PRInt64(0))
|
||||||
mStreamLength = PRUint64(streamLen);
|
mStreamLength = PRUint64(streamLen);
|
||||||
mStream = stream;
|
mStream = stream;
|
||||||
mSegSize = segsize;
|
mSegSize = segsize;
|
||||||
|
|
|
@ -54,7 +54,6 @@
|
||||||
#include "nsAutoPtr.h"
|
#include "nsAutoPtr.h"
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "netCore.h"
|
#include "netCore.h"
|
||||||
#include "nsInt64.h"
|
|
||||||
#include "prmem.h"
|
#include "prmem.h"
|
||||||
#include "plstr.h"
|
#include "plstr.h"
|
||||||
#include "prnetdb.h"
|
#include "prnetdb.h"
|
||||||
|
|
|
@ -45,7 +45,6 @@
|
||||||
#include "nsSocketTransportService2.h"
|
#include "nsSocketTransportService2.h"
|
||||||
#include "nsString.h"
|
#include "nsString.h"
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "nsInt64.h"
|
|
||||||
|
|
||||||
#include "nsISocketTransport.h"
|
#include "nsISocketTransport.h"
|
||||||
#include "nsIInterfaceRequestor.h"
|
#include "nsIInterfaceRequestor.h"
|
||||||
|
|
|
@ -39,7 +39,6 @@
|
||||||
#include "nsXPCOMCIDInternal.h"
|
#include "nsXPCOMCIDInternal.h"
|
||||||
#include "nsNetSegmentUtils.h"
|
#include "nsNetSegmentUtils.h"
|
||||||
#include "nsAutoLock.h"
|
#include "nsAutoLock.h"
|
||||||
#include "nsInt64.h"
|
|
||||||
#include "nsTransportUtils.h"
|
#include "nsTransportUtils.h"
|
||||||
#include "nsStreamUtils.h"
|
#include "nsStreamUtils.h"
|
||||||
#include "nsNetError.h"
|
#include "nsNetError.h"
|
||||||
|
|
|
@ -43,7 +43,6 @@
|
||||||
#include "nsFTPChannel.h"
|
#include "nsFTPChannel.h"
|
||||||
#include "nsBaseContentStream.h"
|
#include "nsBaseContentStream.h"
|
||||||
|
|
||||||
#include "nsInt64.h"
|
|
||||||
#include "nsIThread.h"
|
#include "nsIThread.h"
|
||||||
#include "nsIRunnable.h"
|
#include "nsIRunnable.h"
|
||||||
#include "nsISocketTransportService.h"
|
#include "nsISocketTransportService.h"
|
||||||
|
|
|
@ -64,7 +64,6 @@
|
||||||
#include "prprf.h"
|
#include "prprf.h"
|
||||||
#include "prnetdb.h"
|
#include "prnetdb.h"
|
||||||
#include "nsEscape.h"
|
#include "nsEscape.h"
|
||||||
#include "nsInt64.h"
|
|
||||||
#include "nsStreamUtils.h"
|
#include "nsStreamUtils.h"
|
||||||
#include "nsIOService.h"
|
#include "nsIOService.h"
|
||||||
#include "nsICacheService.h"
|
#include "nsICacheService.h"
|
||||||
|
@ -2501,20 +2500,20 @@ nsHttpChannel::CheckCache()
|
||||||
// size of the cached content, then the cached response is partial...
|
// size of the cached content, then the cached response is partial...
|
||||||
// either we need to issue a byte range request or we need to refetch
|
// either we need to issue a byte range request or we need to refetch
|
||||||
// the entire document.
|
// the entire document.
|
||||||
nsInt64 contentLength = mCachedResponseHead->ContentLength();
|
PRInt64 contentLength = mCachedResponseHead->ContentLength();
|
||||||
if (contentLength != nsInt64(-1)) {
|
if (contentLength != PRInt64(-1)) {
|
||||||
PRUint32 size;
|
PRUint32 size;
|
||||||
rv = mCacheEntry->GetDataSize(&size);
|
rv = mCacheEntry->GetDataSize(&size);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
if (nsInt64(size) != contentLength) {
|
if (PRInt64(size) != contentLength) {
|
||||||
LOG(("Cached data size does not match the Content-Length header "
|
LOG(("Cached data size does not match the Content-Length header "
|
||||||
"[content-length=%lld size=%u]\n", PRInt64(contentLength), size));
|
"[content-length=%lld size=%u]\n", PRInt64(contentLength), size));
|
||||||
|
|
||||||
PRBool hasContentEncoding =
|
PRBool hasContentEncoding =
|
||||||
mCachedResponseHead->PeekHeader(nsHttp::Content_Encoding)
|
mCachedResponseHead->PeekHeader(nsHttp::Content_Encoding)
|
||||||
!= nsnull;
|
!= nsnull;
|
||||||
if ((nsInt64(size) < contentLength) &&
|
if ((PRInt64(size) < contentLength) &&
|
||||||
size > 0 &&
|
size > 0 &&
|
||||||
!hasContentEncoding &&
|
!hasContentEncoding &&
|
||||||
mCachedResponseHead->IsResumable() &&
|
mCachedResponseHead->IsResumable() &&
|
||||||
|
@ -2834,7 +2833,7 @@ nsHttpChannel::ReadFromCache()
|
||||||
if (NS_FAILED(rv)) return rv;
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
|
||||||
rv = nsInputStreamPump::Create(getter_AddRefs(mCachePump),
|
rv = nsInputStreamPump::Create(getter_AddRefs(mCachePump),
|
||||||
stream, nsInt64(-1), nsInt64(-1), 0, 0,
|
stream, PRInt64(-1), PRInt64(-1), 0, 0,
|
||||||
PR_TRUE);
|
PR_TRUE);
|
||||||
if (NS_FAILED(rv)) return rv;
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
|
||||||
|
|
|
@ -988,7 +988,7 @@ nsHttpTransaction::HandleContentStart()
|
||||||
mContentLength = -1;
|
mContentLength = -1;
|
||||||
}
|
}
|
||||||
#if defined(PR_LOGGING)
|
#if defined(PR_LOGGING)
|
||||||
else if (mContentLength == nsInt64(-1))
|
else if (mContentLength == PRInt64(-1))
|
||||||
LOG(("waiting for the server to close the connection.\n"));
|
LOG(("waiting for the server to close the connection.\n"));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -1028,21 +1028,21 @@ nsHttpTransaction::HandleContent(char *buf,
|
||||||
rv = mChunkedDecoder->HandleChunkedContent(buf, count, contentRead, contentRemaining);
|
rv = mChunkedDecoder->HandleChunkedContent(buf, count, contentRead, contentRemaining);
|
||||||
if (NS_FAILED(rv)) return rv;
|
if (NS_FAILED(rv)) return rv;
|
||||||
}
|
}
|
||||||
else if (mContentLength >= nsInt64(0)) {
|
else if (mContentLength >= PRInt64(0)) {
|
||||||
// HTTP/1.0 servers have been known to send erroneous Content-Length
|
// HTTP/1.0 servers have been known to send erroneous Content-Length
|
||||||
// headers. So, unless the connection is persistent, we must make
|
// headers. So, unless the connection is persistent, we must make
|
||||||
// allowances for a possibly invalid Content-Length header. Thus, if
|
// allowances for a possibly invalid Content-Length header. Thus, if
|
||||||
// NOT persistent, we simply accept everything in |buf|.
|
// NOT persistent, we simply accept everything in |buf|.
|
||||||
if (mConnection->IsPersistent()) {
|
if (mConnection->IsPersistent()) {
|
||||||
nsInt64 remaining = mContentLength - mContentRead;
|
PRInt64 remaining = mContentLength - mContentRead;
|
||||||
nsInt64 count64 = count;
|
PRInt64 count64 = count;
|
||||||
*contentRead = PR_MIN(count64, remaining);
|
*contentRead = PR_MIN(count64, remaining);
|
||||||
*contentRemaining = count - *contentRead;
|
*contentRemaining = count - *contentRead;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
*contentRead = count;
|
*contentRead = count;
|
||||||
// mContentLength might need to be increased...
|
// mContentLength might need to be increased...
|
||||||
nsInt64 position = mContentRead + nsInt64(count);
|
PRInt64 position = mContentRead + PRInt64(count);
|
||||||
if (position > mContentLength) {
|
if (position > mContentLength) {
|
||||||
mContentLength = position;
|
mContentLength = position;
|
||||||
//mResponseHead->SetContentLength(mContentLength);
|
//mResponseHead->SetContentLength(mContentLength);
|
||||||
|
|
|
@ -44,7 +44,6 @@
|
||||||
#include "nsAHttpTransaction.h"
|
#include "nsAHttpTransaction.h"
|
||||||
#include "nsAHttpConnection.h"
|
#include "nsAHttpConnection.h"
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "nsInt64.h"
|
|
||||||
|
|
||||||
#include "nsIPipe.h"
|
#include "nsIPipe.h"
|
||||||
#include "nsIInputStream.h"
|
#include "nsIInputStream.h"
|
||||||
|
@ -179,8 +178,8 @@ private:
|
||||||
|
|
||||||
nsCString mLineBuf; // may contain a partial line
|
nsCString mLineBuf; // may contain a partial line
|
||||||
|
|
||||||
nsInt64 mContentLength; // equals -1 if unknown
|
PRInt64 mContentLength; // equals -1 if unknown
|
||||||
nsInt64 mContentRead; // count of consumed content bytes
|
PRInt64 mContentRead; // count of consumed content bytes
|
||||||
|
|
||||||
// After a 304/204 or other "no-content" style response we will skip over
|
// After a 304/204 or other "no-content" style response we will skip over
|
||||||
// up to MAX_INVALID_RESPONSE_BODY_SZ bytes when looking for the next
|
// up to MAX_INVALID_RESPONSE_BODY_SZ bytes when looking for the next
|
||||||
|
|
|
@ -37,7 +37,6 @@
|
||||||
|
|
||||||
#include "nsMultiMixedConv.h"
|
#include "nsMultiMixedConv.h"
|
||||||
#include "nsMemory.h"
|
#include "nsMemory.h"
|
||||||
#include "nsInt64.h"
|
|
||||||
#include "plstr.h"
|
#include "plstr.h"
|
||||||
#include "nsIHttpChannel.h"
|
#include "nsIHttpChannel.h"
|
||||||
#include "nsIServiceManager.h"
|
#include "nsIServiceManager.h"
|
||||||
|
@ -980,7 +979,7 @@ nsMultiMixedConv::ParseHeaders(nsIChannel *aChannel, char *&aPtr,
|
||||||
|
|
||||||
mIsByteRangeRequest = PR_TRUE;
|
mIsByteRangeRequest = PR_TRUE;
|
||||||
if (mContentLength == LL_MAXUINT)
|
if (mContentLength == LL_MAXUINT)
|
||||||
mContentLength = PRUint64(PRInt64(mByteRangeEnd - mByteRangeStart + nsInt64(1)));
|
mContentLength = PRUint64(PRInt64(mByteRangeEnd - mByteRangeStart + PRInt64(1)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*newLine = tmpChar;
|
*newLine = tmpChar;
|
||||||
|
|
|
@ -43,7 +43,6 @@
|
||||||
#include "nsString.h"
|
#include "nsString.h"
|
||||||
#include "nsXPIDLString.h"
|
#include "nsXPIDLString.h"
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "nsInt64.h"
|
|
||||||
#include "nsIByteRangeRequest.h"
|
#include "nsIByteRangeRequest.h"
|
||||||
#include "nsIMultiPartChannel.h"
|
#include "nsIMultiPartChannel.h"
|
||||||
#include "nsAutoPtr.h"
|
#include "nsAutoPtr.h"
|
||||||
|
@ -102,8 +101,8 @@ protected:
|
||||||
PRUint64 mContentLength;
|
PRUint64 mContentLength;
|
||||||
|
|
||||||
PRBool mIsByteRangeRequest;
|
PRBool mIsByteRangeRequest;
|
||||||
nsInt64 mByteRangeStart;
|
PRInt64 mByteRangeStart;
|
||||||
nsInt64 mByteRangeEnd;
|
PRInt64 mByteRangeEnd;
|
||||||
|
|
||||||
PRUint32 mPartID; // unique ID that can be used to identify
|
PRUint32 mPartID; // unique ID that can be used to identify
|
||||||
// this part of the multipart document
|
// this part of the multipart document
|
||||||
|
@ -190,8 +189,8 @@ protected:
|
||||||
// The following members are for tracking the byte ranges in
|
// The following members are for tracking the byte ranges in
|
||||||
// multipart/mixed content which specified the 'Content-Range:'
|
// multipart/mixed content which specified the 'Content-Range:'
|
||||||
// header...
|
// header...
|
||||||
nsInt64 mByteRangeStart;
|
PRInt64 mByteRangeStart;
|
||||||
nsInt64 mByteRangeEnd;
|
PRInt64 mByteRangeEnd;
|
||||||
PRBool mIsByteRangeRequest;
|
PRBool mIsByteRangeRequest;
|
||||||
|
|
||||||
PRUint32 mCurrentPartID;
|
PRUint32 mCurrentPartID;
|
||||||
|
|
|
@ -87,8 +87,6 @@
|
||||||
#include "prlog.h"
|
#include "prlog.h"
|
||||||
#include "prtime.h"
|
#include "prtime.h"
|
||||||
|
|
||||||
#include "nsInt64.h"
|
|
||||||
|
|
||||||
namespace TestProtocols {
|
namespace TestProtocols {
|
||||||
|
|
||||||
#if defined(PR_LOGGING)
|
#if defined(PR_LOGGING)
|
||||||
|
@ -195,7 +193,7 @@ public:
|
||||||
NS_DECL_ISUPPORTS
|
NS_DECL_ISUPPORTS
|
||||||
|
|
||||||
const char* Name() { return mURLString.get(); }
|
const char* Name() { return mURLString.get(); }
|
||||||
nsInt64 mBytesRead;
|
PRInt64 mBytesRead;
|
||||||
PRTime mTotalTime;
|
PRTime mTotalTime;
|
||||||
PRTime mConnectTime;
|
PRTime mConnectTime;
|
||||||
nsCString mURLString;
|
nsCString mURLString;
|
||||||
|
@ -541,9 +539,9 @@ InputTestConsumer::OnStopRequest(nsIRequest *request, nsISupports* context,
|
||||||
LOG(("\tTime to connect: %.3f seconds\n", connectTime));
|
LOG(("\tTime to connect: %.3f seconds\n", connectTime));
|
||||||
LOG(("\tTime to read: %.3f seconds.\n", readTime));
|
LOG(("\tTime to read: %.3f seconds.\n", readTime));
|
||||||
LOG(("\tRead: %lld bytes.\n", info->mBytesRead.mValue));
|
LOG(("\tRead: %lld bytes.\n", info->mBytesRead.mValue));
|
||||||
if (info->mBytesRead == nsInt64(0)) {
|
if (info->mBytesRead == PRInt64(0)) {
|
||||||
} else if (readTime > 0.0) {
|
} else if (readTime > 0.0) {
|
||||||
LOG(("\tThroughput: %.0f bps.\n", (PRFloat64)(info->mBytesRead*nsInt64(8))/readTime));
|
LOG(("\tThroughput: %.0f bps.\n", (PRFloat64)(info->mBytesRead*PRInt64(8))/readTime));
|
||||||
} else {
|
} else {
|
||||||
LOG(("\tThroughput: REAL FAST!!\n"));
|
LOG(("\tThroughput: REAL FAST!!\n"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -225,12 +225,12 @@ RunTest(nsIFile *srcFile, nsIFile *destFile)
|
||||||
if (NS_FAILED(rv)) return rv;
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
|
||||||
nsCOMPtr<nsITransport> srcTransport;
|
nsCOMPtr<nsITransport> srcTransport;
|
||||||
rv = sts->CreateInputTransport(srcStr, nsInt64(-1), nsInt64(-1), PR_TRUE,
|
rv = sts->CreateInputTransport(srcStr, PRInt64(-1), PRInt64(-1), PR_TRUE,
|
||||||
getter_AddRefs(srcTransport));
|
getter_AddRefs(srcTransport));
|
||||||
if (NS_FAILED(rv)) return rv;
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
|
||||||
nsCOMPtr<nsITransport> destTransport;
|
nsCOMPtr<nsITransport> destTransport;
|
||||||
rv = sts->CreateOutputTransport(destStr, nsInt64(-1), nsInt64(-1), PR_TRUE,
|
rv = sts->CreateOutputTransport(destStr, PRInt64(-1), PRInt64(-1), PR_TRUE,
|
||||||
getter_AddRefs(destTransport));
|
getter_AddRefs(destTransport));
|
||||||
if (NS_FAILED(rv)) return rv;
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
|
||||||
|
@ -270,7 +270,7 @@ RunBlockingTest(nsIFile *srcFile, nsIFile *destFile)
|
||||||
if (NS_FAILED(rv)) return rv;
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
|
||||||
nsCOMPtr<nsITransport> destTransport;
|
nsCOMPtr<nsITransport> destTransport;
|
||||||
rv = sts->CreateOutputTransport(fileOut, nsInt64(-1), nsInt64(-1),
|
rv = sts->CreateOutputTransport(fileOut, PRInt64(-1), PRInt64(-1),
|
||||||
PR_TRUE, getter_AddRefs(destTransport));
|
PR_TRUE, getter_AddRefs(destTransport));
|
||||||
if (NS_FAILED(rv)) return rv;
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,6 @@
|
||||||
#include "nsISSLStatusProvider.h"
|
#include "nsISSLStatusProvider.h"
|
||||||
#include "nsStrictTransportSecurityService.h"
|
#include "nsStrictTransportSecurityService.h"
|
||||||
#include "nsIURI.h"
|
#include "nsIURI.h"
|
||||||
#include "nsInt64.h"
|
|
||||||
#include "nsNetUtil.h"
|
#include "nsNetUtil.h"
|
||||||
#include "nsThreadUtils.h"
|
#include "nsThreadUtils.h"
|
||||||
#include "nsStringGlue.h"
|
#include "nsStringGlue.h"
|
||||||
|
|
|
@ -94,7 +94,6 @@
|
||||||
#include "nsReadableUtils.h"
|
#include "nsReadableUtils.h"
|
||||||
#include "nsIDateTimeFormat.h"
|
#include "nsIDateTimeFormat.h"
|
||||||
#include "prtypes.h"
|
#include "prtypes.h"
|
||||||
#include "nsInt64.h"
|
|
||||||
#include "nsTime.h"
|
#include "nsTime.h"
|
||||||
#include "nsIEntropyCollector.h"
|
#include "nsIEntropyCollector.h"
|
||||||
#include "nsIBufEntropyCollector.h"
|
#include "nsIBufEntropyCollector.h"
|
||||||
|
|
|
@ -107,8 +107,8 @@ struct nsRequestInfo : public PLDHashEntryHdr
|
||||||
}
|
}
|
||||||
|
|
||||||
const void* mKey; // Must be first for the pldhash stubs to work
|
const void* mKey; // Must be first for the pldhash stubs to work
|
||||||
nsInt64 mCurrentProgress;
|
PRInt64 mCurrentProgress;
|
||||||
nsInt64 mMaxProgress;
|
PRInt64 mMaxProgress;
|
||||||
PRBool mUploading;
|
PRBool mUploading;
|
||||||
|
|
||||||
PRBool mIsDone;
|
PRBool mIsDone;
|
||||||
|
@ -151,6 +151,11 @@ struct nsListenerInfo {
|
||||||
nsDocLoader::nsDocLoader()
|
nsDocLoader::nsDocLoader()
|
||||||
: mParent(nsnull),
|
: mParent(nsnull),
|
||||||
mListenerInfoList(8),
|
mListenerInfoList(8),
|
||||||
|
mCurrentSelfProgress(0),
|
||||||
|
mMaxSelfProgress(0),
|
||||||
|
mCurrentTotalProgress(0),
|
||||||
|
mMaxTotalProgress(0),
|
||||||
|
mCompletedTotalProgress(0),
|
||||||
mIsLoadingDocument(PR_FALSE),
|
mIsLoadingDocument(PR_FALSE),
|
||||||
mIsRestoringDocument(PR_FALSE),
|
mIsRestoringDocument(PR_FALSE),
|
||||||
mDontFlushLayout(PR_FALSE),
|
mDontFlushLayout(PR_FALSE),
|
||||||
|
@ -598,7 +603,7 @@ nsDocLoader::OnStopRequest(nsIRequest *aRequest,
|
||||||
if (info) {
|
if (info) {
|
||||||
info->mIsDone = PR_TRUE;
|
info->mIsDone = PR_TRUE;
|
||||||
|
|
||||||
nsInt64 oldMax = info->mMaxProgress;
|
PRInt64 oldMax = info->mMaxProgress;
|
||||||
|
|
||||||
info->mMaxProgress = info->mCurrentProgress;
|
info->mMaxProgress = info->mCurrentProgress;
|
||||||
|
|
||||||
|
@ -607,7 +612,7 @@ nsDocLoader::OnStopRequest(nsIRequest *aRequest,
|
||||||
// finished loading, then use this new data to try to calculate a
|
// finished loading, then use this new data to try to calculate a
|
||||||
// mMaxSelfProgress...
|
// mMaxSelfProgress...
|
||||||
//
|
//
|
||||||
if ((oldMax < nsInt64(0)) && (mMaxSelfProgress < nsInt64(0))) {
|
if ((oldMax < PRInt64(0)) && (mMaxSelfProgress < PRInt64(0))) {
|
||||||
mMaxSelfProgress = CalculateMaxProgress();
|
mMaxSelfProgress = CalculateMaxProgress();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1015,31 +1020,31 @@ nsDocLoader::GetIsLoadingDocument(PRBool *aIsLoadingDocument)
|
||||||
|
|
||||||
PRInt64 nsDocLoader::GetMaxTotalProgress()
|
PRInt64 nsDocLoader::GetMaxTotalProgress()
|
||||||
{
|
{
|
||||||
nsInt64 newMaxTotal = 0;
|
PRInt64 newMaxTotal = 0;
|
||||||
|
|
||||||
PRInt32 count = mChildList.Count();
|
PRInt32 count = mChildList.Count();
|
||||||
nsCOMPtr<nsIWebProgress> webProgress;
|
nsCOMPtr<nsIWebProgress> webProgress;
|
||||||
for (PRInt32 i=0; i < count; i++)
|
for (PRInt32 i=0; i < count; i++)
|
||||||
{
|
{
|
||||||
nsInt64 individualProgress = 0;
|
PRInt64 individualProgress = 0;
|
||||||
nsIDocumentLoader* docloader = ChildAt(i);
|
nsIDocumentLoader* docloader = ChildAt(i);
|
||||||
if (docloader)
|
if (docloader)
|
||||||
{
|
{
|
||||||
// Cast is safe since all children are nsDocLoader too
|
// Cast is safe since all children are nsDocLoader too
|
||||||
individualProgress = ((nsDocLoader *) docloader)->GetMaxTotalProgress();
|
individualProgress = ((nsDocLoader *) docloader)->GetMaxTotalProgress();
|
||||||
}
|
}
|
||||||
if (individualProgress < nsInt64(0)) // if one of the elements doesn't know it's size
|
if (individualProgress < PRInt64(0)) // if one of the elements doesn't know it's size
|
||||||
// then none of them do
|
// then none of them do
|
||||||
{
|
{
|
||||||
newMaxTotal = nsInt64(-1);
|
newMaxTotal = PRInt64(-1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
newMaxTotal += individualProgress;
|
newMaxTotal += individualProgress;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsInt64 progress = -1;
|
PRInt64 progress = -1;
|
||||||
if (mMaxSelfProgress >= nsInt64(0) && newMaxTotal >= nsInt64(0))
|
if (mMaxSelfProgress >= PRInt64(0) && newMaxTotal >= PRInt64(0))
|
||||||
progress = newMaxTotal + mMaxSelfProgress;
|
progress = newMaxTotal + mMaxSelfProgress;
|
||||||
|
|
||||||
return progress;
|
return progress;
|
||||||
|
@ -1055,7 +1060,7 @@ NS_IMETHODIMP nsDocLoader::OnProgress(nsIRequest *aRequest, nsISupports* ctxt,
|
||||||
PRUint64 aProgress, PRUint64 aProgressMax)
|
PRUint64 aProgress, PRUint64 aProgressMax)
|
||||||
{
|
{
|
||||||
nsRequestInfo *info;
|
nsRequestInfo *info;
|
||||||
nsInt64 progressDelta = 0;
|
PRInt64 progressDelta = 0;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Update the RequestInfo entry with the new progress data
|
// Update the RequestInfo entry with the new progress data
|
||||||
|
@ -1063,7 +1068,7 @@ NS_IMETHODIMP nsDocLoader::OnProgress(nsIRequest *aRequest, nsISupports* ctxt,
|
||||||
info = GetRequestInfo(aRequest);
|
info = GetRequestInfo(aRequest);
|
||||||
if (info) {
|
if (info) {
|
||||||
// suppress sending STATE_TRANSFERRING if this is upload progress (see bug 240053)
|
// suppress sending STATE_TRANSFERRING if this is upload progress (see bug 240053)
|
||||||
if (!info->mUploading && (nsInt64(0) == info->mCurrentProgress) && (nsInt64(0) == info->mMaxProgress)) {
|
if (!info->mUploading && (PRInt64(0) == info->mCurrentProgress) && (PRInt64(0) == info->mMaxProgress)) {
|
||||||
//
|
//
|
||||||
// If we receive an OnProgress event from a toplevel channel that the URI Loader
|
// If we receive an OnProgress event from a toplevel channel that the URI Loader
|
||||||
// has not yet targeted, then we must suppress the event. This is necessary to
|
// has not yet targeted, then we must suppress the event. This is necessary to
|
||||||
|
@ -1088,8 +1093,8 @@ NS_IMETHODIMP nsDocLoader::OnProgress(nsIRequest *aRequest, nsISupports* ctxt,
|
||||||
mMaxSelfProgress += PRInt64(aProgressMax);
|
mMaxSelfProgress += PRInt64(aProgressMax);
|
||||||
info->mMaxProgress = PRInt64(aProgressMax);
|
info->mMaxProgress = PRInt64(aProgressMax);
|
||||||
} else {
|
} else {
|
||||||
mMaxSelfProgress = nsInt64(-1);
|
mMaxSelfProgress = PRInt64(-1);
|
||||||
info->mMaxProgress = nsInt64(-1);
|
info->mMaxProgress = PRInt64(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send a STATE_TRANSFERRING notification for the request.
|
// Send a STATE_TRANSFERRING notification for the request.
|
||||||
|
@ -1111,7 +1116,7 @@ NS_IMETHODIMP nsDocLoader::OnProgress(nsIRequest *aRequest, nsISupports* ctxt,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the current progress count...
|
// Update the current progress count...
|
||||||
progressDelta = nsInt64(PRInt64(aProgress)) - info->mCurrentProgress;
|
progressDelta = PRInt64(aProgress) - info->mCurrentProgress;
|
||||||
mCurrentSelfProgress += progressDelta;
|
mCurrentSelfProgress += progressDelta;
|
||||||
|
|
||||||
info->mCurrentProgress = PRInt64(aProgress);
|
info->mCurrentProgress = PRInt64(aProgress);
|
||||||
|
@ -1565,10 +1570,10 @@ CalcMaxProgressCallback(PLDHashTable *table, PLDHashEntryHdr *hdr,
|
||||||
PRUint32 number, void *arg)
|
PRUint32 number, void *arg)
|
||||||
{
|
{
|
||||||
const nsRequestInfo *info = static_cast<const nsRequestInfo *>(hdr);
|
const nsRequestInfo *info = static_cast<const nsRequestInfo *>(hdr);
|
||||||
nsInt64 *max = static_cast<nsInt64 *>(arg);
|
PRInt64 *max = static_cast<PRInt64 *>(arg);
|
||||||
|
|
||||||
if (info->mMaxProgress < info->mCurrentProgress) {
|
if (info->mMaxProgress < info->mCurrentProgress) {
|
||||||
*max = nsInt64(-1);
|
*max = PRInt64(-1);
|
||||||
|
|
||||||
return PL_DHASH_STOP;
|
return PL_DHASH_STOP;
|
||||||
}
|
}
|
||||||
|
@ -1580,7 +1585,7 @@ CalcMaxProgressCallback(PLDHashTable *table, PLDHashEntryHdr *hdr,
|
||||||
|
|
||||||
PRInt64 nsDocLoader::CalculateMaxProgress()
|
PRInt64 nsDocLoader::CalculateMaxProgress()
|
||||||
{
|
{
|
||||||
nsInt64 max = mCompletedTotalProgress;
|
PRInt64 max = mCompletedTotalProgress;
|
||||||
PL_DHashTableEnumerate(&mRequestInfoHash, CalcMaxProgressCallback, &max);
|
PL_DHashTableEnumerate(&mRequestInfoHash, CalcMaxProgressCallback, &max);
|
||||||
return max;
|
return max;
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,6 @@
|
||||||
#include "nsIChannelEventSink.h"
|
#include "nsIChannelEventSink.h"
|
||||||
#include "nsISecurityEventSink.h"
|
#include "nsISecurityEventSink.h"
|
||||||
#include "nsISupportsPriority.h"
|
#include "nsISupportsPriority.h"
|
||||||
#include "nsInt64.h"
|
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "pldhash.h"
|
#include "pldhash.h"
|
||||||
|
|
||||||
|
@ -226,14 +225,14 @@ protected:
|
||||||
// feedback interfaces that travis cooked up.
|
// feedback interfaces that travis cooked up.
|
||||||
PRInt32 mProgressStateFlags;
|
PRInt32 mProgressStateFlags;
|
||||||
|
|
||||||
nsInt64 mCurrentSelfProgress;
|
PRInt64 mCurrentSelfProgress;
|
||||||
nsInt64 mMaxSelfProgress;
|
PRInt64 mMaxSelfProgress;
|
||||||
|
|
||||||
nsInt64 mCurrentTotalProgress;
|
PRInt64 mCurrentTotalProgress;
|
||||||
nsInt64 mMaxTotalProgress;
|
PRInt64 mMaxTotalProgress;
|
||||||
|
|
||||||
PLDHashTable mRequestInfoHash;
|
PLDHashTable mRequestInfoHash;
|
||||||
nsInt64 mCompletedTotalProgress;
|
PRInt64 mCompletedTotalProgress;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This flag indicates that the loader is loading a document. It is set
|
* This flag indicates that the loader is loading a document. It is set
|
||||||
|
|
|
@ -49,8 +49,6 @@
|
||||||
#include "prlog.h"
|
#include "prlog.h"
|
||||||
#include "prtime.h"
|
#include "prtime.h"
|
||||||
|
|
||||||
#include "nsInt64.h"
|
|
||||||
|
|
||||||
#include "nsIExternalHelperAppService.h"
|
#include "nsIExternalHelperAppService.h"
|
||||||
#include "nsIExternalProtocolService.h"
|
#include "nsIExternalProtocolService.h"
|
||||||
#include "nsIWebProgressListener2.h"
|
#include "nsIWebProgressListener2.h"
|
||||||
|
@ -341,8 +339,8 @@ protected:
|
||||||
PRBool mTempFileIsExecutable;
|
PRBool mTempFileIsExecutable;
|
||||||
|
|
||||||
PRTime mTimeDownloadStarted;
|
PRTime mTimeDownloadStarted;
|
||||||
nsInt64 mContentLength;
|
PRInt64 mContentLength;
|
||||||
nsInt64 mProgress; /**< Number of bytes received (for sending progress notifications). */
|
PRInt64 mProgress; /**< Number of bytes received (for sending progress notifications). */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When we are told to save the temp file to disk (in a more permament
|
* When we are told to save the temp file to disk (in a more permament
|
||||||
|
|
|
@ -53,7 +53,6 @@
|
||||||
#include "nsIPrefBranch.h"
|
#include "nsIPrefBranch.h"
|
||||||
#include "nsIPrefService.h"
|
#include "nsIPrefService.h"
|
||||||
#include "nsRegion.h"
|
#include "nsRegion.h"
|
||||||
#include "nsInt64.h"
|
|
||||||
#include "nsHashtable.h"
|
#include "nsHashtable.h"
|
||||||
#include "nsCOMArray.h"
|
#include "nsCOMArray.h"
|
||||||
#include "nsThreadUtils.h"
|
#include "nsThreadUtils.h"
|
||||||
|
|
|
@ -91,7 +91,6 @@
|
||||||
#include "mozilla/FunctionTimer.h"
|
#include "mozilla/FunctionTimer.h"
|
||||||
#include "ManifestParser.h"
|
#include "ManifestParser.h"
|
||||||
|
|
||||||
#include "nsInt64.h"
|
|
||||||
#include "nsManifestLineReader.h"
|
#include "nsManifestLineReader.h"
|
||||||
#include "mozilla/GenericFactory.h"
|
#include "mozilla/GenericFactory.h"
|
||||||
#include "nsSupportsPrimitives.h"
|
#include "nsSupportsPrimitives.h"
|
||||||
|
|
|
@ -100,7 +100,6 @@ EXPORTS = \
|
||||||
nsHashtable.h \
|
nsHashtable.h \
|
||||||
nsIByteBuffer.h \
|
nsIByteBuffer.h \
|
||||||
nsIUnicharBuffer.h \
|
nsIUnicharBuffer.h \
|
||||||
nsInt64.h \
|
|
||||||
nsMathUtils.h \
|
nsMathUtils.h \
|
||||||
nsObserverService.h \
|
nsObserverService.h \
|
||||||
nsRecyclingAllocator.h \
|
nsRecyclingAllocator.h \
|
||||||
|
|
|
@ -1,44 +0,0 @@
|
||||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
||||||
/* ***** BEGIN LICENSE BLOCK *****
|
|
||||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
||||||
*
|
|
||||||
* The contents of this file are subject to the Mozilla Public License Version
|
|
||||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
|
||||||
* the License. You may obtain a copy of the License at
|
|
||||||
* http://www.mozilla.org/MPL/
|
|
||||||
*
|
|
||||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
||||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
||||||
* for the specific language governing rights and limitations under the
|
|
||||||
* License.
|
|
||||||
*
|
|
||||||
* The Original Code is mozilla.org code.
|
|
||||||
*
|
|
||||||
* The Initial Developer of the Original Code is
|
|
||||||
* Netscape Communications Corporation.
|
|
||||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
||||||
* the Initial Developer. All Rights Reserved.
|
|
||||||
*
|
|
||||||
* Contributor(s):
|
|
||||||
*
|
|
||||||
* Alternatively, the contents of this file may be used under the terms of
|
|
||||||
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
||||||
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
||||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
||||||
* of those above. If you wish to allow use of your version of this file only
|
|
||||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
||||||
* use your version of this file under the terms of the MPL, indicate your
|
|
||||||
* decision by deleting the provisions above and replace them with the notice
|
|
||||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
||||||
* the provisions above, a recipient may use your version of this file under
|
|
||||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
||||||
*
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
#ifndef nsInt64_h__
|
|
||||||
#define nsInt64_h__
|
|
||||||
|
|
||||||
typedef PRInt64 nsInt64;
|
|
||||||
typedef PRUint64 nsUint64;
|
|
||||||
|
|
||||||
#endif // nsInt64_h__
|
|
|
@ -56,7 +56,6 @@
|
||||||
|
|
||||||
#include "nsBinaryStream.h"
|
#include "nsBinaryStream.h"
|
||||||
#include "nsFastLoadFile.h"
|
#include "nsFastLoadFile.h"
|
||||||
#include "nsInt64.h"
|
|
||||||
#ifdef XP_UNIX
|
#ifdef XP_UNIX
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -51,7 +51,6 @@
|
||||||
#include "nsISeekableStream.h"
|
#include "nsISeekableStream.h"
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "nsCOMArray.h"
|
#include "nsCOMArray.h"
|
||||||
#include "nsInt64.h"
|
|
||||||
#include "nsIIPCSerializable.h"
|
#include "nsIIPCSerializable.h"
|
||||||
#include "nsIClassInfoImpl.h"
|
#include "nsIClassInfoImpl.h"
|
||||||
|
|
||||||
|
@ -384,7 +383,7 @@ nsMultiplexInputStream::Tell(PRInt64 *_retval)
|
||||||
return mStatus;
|
return mStatus;
|
||||||
|
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
nsInt64 ret64 = 0;
|
PRInt64 ret64 = 0;
|
||||||
PRUint32 i, last;
|
PRUint32 i, last;
|
||||||
last = mStartedReadingCurrent ? mCurrentStream+1 : mCurrentStream;
|
last = mStartedReadingCurrent ? mCurrentStream+1 : mCurrentStream;
|
||||||
for (i = 0; i < last; ++i) {
|
for (i = 0; i < last; ++i) {
|
||||||
|
|
|
@ -45,7 +45,6 @@
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "nsCRT.h"
|
#include "nsCRT.h"
|
||||||
#include "prlog.h"
|
#include "prlog.h"
|
||||||
#include "nsInt64.h"
|
|
||||||
#include "nsIClassInfoImpl.h"
|
#include "nsIClassInfoImpl.h"
|
||||||
#include "nsAtomicRefcnt.h"
|
#include "nsAtomicRefcnt.h"
|
||||||
|
|
||||||
|
@ -152,7 +151,7 @@ private:
|
||||||
|
|
||||||
// separate refcnt so that we know when to close the consumer
|
// separate refcnt so that we know when to close the consumer
|
||||||
nsrefcnt mReaderRefCnt;
|
nsrefcnt mReaderRefCnt;
|
||||||
nsInt64 mLogicalOffset;
|
PRInt64 mLogicalOffset;
|
||||||
PRPackedBool mBlocking;
|
PRPackedBool mBlocking;
|
||||||
|
|
||||||
// these variables can only be accessed while inside the pipe's monitor
|
// these variables can only be accessed while inside the pipe's monitor
|
||||||
|
@ -206,7 +205,7 @@ private:
|
||||||
|
|
||||||
// separate refcnt so that we know when to close the producer
|
// separate refcnt so that we know when to close the producer
|
||||||
nsrefcnt mWriterRefCnt;
|
nsrefcnt mWriterRefCnt;
|
||||||
nsInt64 mLogicalOffset;
|
PRInt64 mLogicalOffset;
|
||||||
PRPackedBool mBlocking;
|
PRPackedBool mBlocking;
|
||||||
|
|
||||||
// these variables can only be accessed while inside the pipe's monitor
|
// these variables can only be accessed while inside the pipe's monitor
|
||||||
|
|
|
@ -54,7 +54,6 @@
|
||||||
#include "nsIInputStream.h"
|
#include "nsIInputStream.h"
|
||||||
#include "nsISeekableStream.h"
|
#include "nsISeekableStream.h"
|
||||||
#include "prlog.h"
|
#include "prlog.h"
|
||||||
#include "nsInt64.h"
|
|
||||||
|
|
||||||
#if defined(PR_LOGGING)
|
#if defined(PR_LOGGING)
|
||||||
//
|
//
|
||||||
|
|
|
@ -61,7 +61,6 @@
|
||||||
#include "nsReadableUtils.h"
|
#include "nsReadableUtils.h"
|
||||||
#include "nsISeekableStream.h"
|
#include "nsISeekableStream.h"
|
||||||
#include "nsISupportsPrimitives.h"
|
#include "nsISupportsPrimitives.h"
|
||||||
#include "nsInt64.h"
|
|
||||||
#include "nsCRT.h"
|
#include "nsCRT.h"
|
||||||
#include "prerror.h"
|
#include "prerror.h"
|
||||||
#include "plstr.h"
|
#include "plstr.h"
|
||||||
|
|
|
@ -66,7 +66,6 @@
|
||||||
#include "nsMemory.h"
|
#include "nsMemory.h"
|
||||||
|
|
||||||
#include "nsCOMArray.h"
|
#include "nsCOMArray.h"
|
||||||
#include "nsInt64.h"
|
|
||||||
#include "nsQuickSort.h"
|
#include "nsQuickSort.h"
|
||||||
|
|
||||||
#include "nsXPIDLString.h"
|
#include "nsXPIDLString.h"
|
||||||
|
|
|
@ -40,7 +40,6 @@
|
||||||
#include "nscore.h"
|
#include "nscore.h"
|
||||||
#include "prprf.h"
|
#include "prprf.h"
|
||||||
#include "plstr.h"
|
#include "plstr.h"
|
||||||
#include "nsInt64.h"
|
|
||||||
|
|
||||||
#include "nsISupports.h"
|
#include "nsISupports.h"
|
||||||
#include "nsIServiceManager.h"
|
#include "nsIServiceManager.h"
|
||||||
|
|
Загрузка…
Ссылка в новой задаче