diff --git a/content/html/document/src/nsWyciwygChannel.cpp b/content/html/document/src/nsWyciwygChannel.cpp index 2e1deffab90..7f10a710abe 100644 --- a/content/html/document/src/nsWyciwygChannel.cpp +++ b/content/html/document/src/nsWyciwygChannel.cpp @@ -509,8 +509,8 @@ nsWyciwygChannel::OnDataAvailable(nsIRequest *request, nsISupports *ctx, // XXX handle 64-bit stuff for real if (mProgressSink && NS_SUCCEEDED(rv) && !(mLoadFlags & LOAD_BACKGROUND)) - mProgressSink->OnProgress(this, nsnull, nsUint64(offset + count), - nsUint64(mContentLength)); + mProgressSink->OnProgress(this, nsnull, PRUint64(offset + count), + PRUint64(mContentLength)); return rv; // let the pump cancel on failure } diff --git a/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp b/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp index 4b00029dc73..9db66e577ae 100644 --- a/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp +++ b/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp @@ -986,8 +986,8 @@ NS_IMETHODIMP nsWebBrowserPersist::OnProgress( else { // have to truncate 64-bit to 32bit - mProgressListener->OnProgressChange(nsnull, request, nsUint64(aProgress), - nsUint64(aProgressMax), mTotalCurrentProgress, mTotalMaxProgress); + mProgressListener->OnProgressChange(nsnull, request, PRUint64(aProgress), + PRUint64(aProgressMax), mTotalCurrentProgress, mTotalMaxProgress); } // If our progress listener implements nsIProgressEventSink, diff --git a/embedding/tests/wxEmbed/GeckoProtocolHandler.cpp b/embedding/tests/wxEmbed/GeckoProtocolHandler.cpp index c410f008608..4bdf675048e 100644 --- a/embedding/tests/wxEmbed/GeckoProtocolHandler.cpp +++ b/embedding/tests/wxEmbed/GeckoProtocolHandler.cpp @@ -559,8 +559,8 @@ GeckoProtocolChannel::OnDataAvailable(nsIRequest *req, nsISupports *ctx, // XXX can this use real 64-bit ints? if (mProgressSink && NS_SUCCEEDED(rv) && !(mLoadFlags & LOAD_BACKGROUND)) - mProgressSink->OnProgress(this, nsnull, nsUint64(offset + count), - nsUint64(mContentLength)); + mProgressSink->OnProgress(this, nsnull, PRUint64(offset + count), + PRUint64(mContentLength)); return rv; // let the pump cancel on failure } diff --git a/modules/libjar/nsJARChannel.cpp b/modules/libjar/nsJARChannel.cpp index 2b17b0f98fc..7828dd0267f 100644 --- a/modules/libjar/nsJARChannel.cpp +++ b/modules/libjar/nsJARChannel.cpp @@ -913,8 +913,8 @@ nsJARChannel::OnDataAvailable(nsIRequest *req, nsISupports *ctx, // nsITransportEventSink implementation. // XXX do the 64-bit stuff for real if (mProgressSink && NS_SUCCEEDED(rv) && !(mLoadFlags & LOAD_BACKGROUND)) - mProgressSink->OnProgress(this, nsnull, nsUint64(offset + count), - nsUint64(mContentLength)); + mProgressSink->OnProgress(this, nsnull, PRUint64(offset + count), + PRUint64(mContentLength)); return rv; // let the pump cancel on failure } diff --git a/netwerk/base/src/nsSocketTransport2.h b/netwerk/base/src/nsSocketTransport2.h index 35efa229a46..60a4ff968cb 100644 --- a/netwerk/base/src/nsSocketTransport2.h +++ b/netwerk/base/src/nsSocketTransport2.h @@ -90,7 +90,7 @@ private: nsresult mCondition; nsCOMPtr mCallback; PRUint32 mCallbackFlags; - nsUint64 mByteCount; + PRUint64 mByteCount; }; //----------------------------------------------------------------------------- @@ -124,7 +124,7 @@ private: nsresult mCondition; nsCOMPtr mCallback; PRUint32 mCallbackFlags; - nsUint64 mByteCount; + PRUint64 mByteCount; }; //----------------------------------------------------------------------------- diff --git a/netwerk/base/src/nsStreamTransportService.cpp b/netwerk/base/src/nsStreamTransportService.cpp index d3b6c98b7c9..69ef9509bdf 100644 --- a/netwerk/base/src/nsStreamTransportService.cpp +++ b/netwerk/base/src/nsStreamTransportService.cpp @@ -94,8 +94,8 @@ private: // nsIInputStream implementation. nsCOMPtr mEventSink; nsCOMPtr mSource; - nsUint64 mOffset; - nsUint64 mLimit; + PRUint64 mOffset; + PRUint64 mLimit; PRPackedBool mCloseWhenDone; PRPackedBool mFirstTime; @@ -208,14 +208,12 @@ nsInputStreamTransport::Read(char *buf, PRUint32 count, PRUint32 *result) { if (mFirstTime) { mFirstTime = PR_FALSE; - if (mOffset != nsUint64(0)) { + if (mOffset != 0) { // read from current position if offset equal to max if (mOffset != LL_MAXUINT) { nsCOMPtr seekable = do_QueryInterface(mSource); - // Note: The casts to PRUint64 are needed to cast to PRInt64, as - // nsUint64 can't directly be cast to PRInt64 if (seekable) - seekable->Seek(nsISeekableStream::NS_SEEK_SET, PRUint64(mOffset)); + seekable->Seek(nsISeekableStream::NS_SEEK_SET, mOffset); } // reset offset to zero so we can use it to enforce limit mOffset = 0; @@ -296,8 +294,8 @@ private: // nsIOutputStream implementation. nsCOMPtr mEventSink; nsCOMPtr mSink; - nsUint64 mOffset; - nsUint64 mLimit; + PRUint64 mOffset; + PRUint64 mLimit; PRPackedBool mCloseWhenDone; PRPackedBool mFirstTime; @@ -410,14 +408,12 @@ nsOutputStreamTransport::Write(const char *buf, PRUint32 count, PRUint32 *result { if (mFirstTime) { mFirstTime = PR_FALSE; - if (mOffset != nsUint64(0)) { + if (mOffset != 0) { // write to current position if offset equal to max if (mOffset != LL_MAXUINT) { nsCOMPtr seekable = do_QueryInterface(mSink); - // Note: The casts to PRUint64 are needed to cast to PRInt64, as - // nsUint64 can't directly be cast to PRInt64 if (seekable) - seekable->Seek(nsISeekableStream::NS_SEEK_SET, PRUint64(mOffset)); + seekable->Seek(nsISeekableStream::NS_SEEK_SET, mOffset); } // reset offset to zero so we can use it to enforce limit mOffset = 0; diff --git a/netwerk/protocol/http/src/nsHttpChannel.cpp b/netwerk/protocol/http/src/nsHttpChannel.cpp index 0a7857d7658..0ad55cbb487 100644 --- a/netwerk/protocol/http/src/nsHttpChannel.cpp +++ b/netwerk/protocol/http/src/nsHttpChannel.cpp @@ -5264,8 +5264,8 @@ nsHttpChannel::OnDataAvailable(nsIRequest *request, nsISupports *ctxt, // of a byte range request, the content length stored in the cached // response headers is what we want to use here. - nsUint64 progressMax(PRUint64(mResponseHead->ContentLength())); - nsUint64 progress = mLogicalOffset + nsUint64(count); + PRUint64 progressMax(PRUint64(mResponseHead->ContentLength())); + PRUint64 progress = mLogicalOffset + PRUint64(count); NS_ASSERTION(progress <= progressMax, "unexpected progress values"); OnTransportStatus(nsnull, transportStatus, progress, progressMax); diff --git a/netwerk/protocol/http/src/nsHttpChannel.h b/netwerk/protocol/http/src/nsHttpChannel.h index 6746f164c71..377f3602555 100644 --- a/netwerk/protocol/http/src/nsHttpChannel.h +++ b/netwerk/protocol/http/src/nsHttpChannel.h @@ -285,7 +285,7 @@ private: PRUint32 mLoadFlags; PRUint32 mStatus; - nsUint64 mLogicalOffset; + PRUint64 mLogicalOffset; PRUint8 mCaps; PRInt16 mPriority; diff --git a/netwerk/protocol/http/src/nsHttpTransaction.cpp b/netwerk/protocol/http/src/nsHttpTransaction.cpp index c4bdcfef5dc..754ec179d96 100644 --- a/netwerk/protocol/http/src/nsHttpTransaction.cpp +++ b/netwerk/protocol/http/src/nsHttpTransaction.cpp @@ -378,7 +378,7 @@ nsHttpTransaction::OnTransportStatus(nsresult status, PRUint64 progress) if (status == nsISocketTransport::STATUS_RECEIVING_FROM) return; - nsUint64 progressMax; + PRUint64 progressMax; if (status == nsISocketTransport::STATUS_SENDING_TO) { // suppress progress when only writing request headers diff --git a/netwerk/streamconv/converters/nsMultiMixedConv.cpp b/netwerk/streamconv/converters/nsMultiMixedConv.cpp index 9765ffffa89..1db2668d10d 100644 --- a/netwerk/streamconv/converters/nsMultiMixedConv.cpp +++ b/netwerk/streamconv/converters/nsMultiMixedConv.cpp @@ -814,7 +814,7 @@ nsMultiMixedConv::SendData(char *aBuffer, PRUint32 aLen) { if (mContentLength != LL_MAXUINT) { // make sure that we don't send more than the mContentLength // XXX why? perhaps the Content-Length header was actually wrong!! - if ((nsUint64(aLen) + mTotalSent) > mContentLength) + if ((PRUint64(aLen) + mTotalSent) > mContentLength) aLen = mContentLength - mTotalSent; if (aLen == 0) diff --git a/netwerk/streamconv/converters/nsMultiMixedConv.h b/netwerk/streamconv/converters/nsMultiMixedConv.h index db96aaa1980..2a55e7c44b8 100644 --- a/netwerk/streamconv/converters/nsMultiMixedConv.h +++ b/netwerk/streamconv/converters/nsMultiMixedConv.h @@ -93,7 +93,7 @@ protected: nsCString mContentType; nsCString mContentCharset; nsCString mContentDisposition; - nsUint64 mContentLength; + PRUint64 mContentLength; PRBool mIsByteRangeRequest; nsInt64 mByteRangeStart; @@ -174,11 +174,11 @@ protected: nsCOMPtr mContext; nsCString mContentType; nsCString mContentDisposition; - nsUint64 mContentLength; + PRUint64 mContentLength; char *mBuffer; PRUint32 mBufLen; - nsUint64 mTotalSent; + PRUint64 mTotalSent; PRBool mFirstOnData; // used to determine if we're in our first OnData callback. // The following members are for tracking the byte ranges in diff --git a/uriloader/base/nsDocLoader.cpp b/uriloader/base/nsDocLoader.cpp index 00baa955f00..e67f97444ee 100644 --- a/uriloader/base/nsDocLoader.cpp +++ b/uriloader/base/nsDocLoader.cpp @@ -1068,7 +1068,7 @@ NS_IMETHODIMP nsDocLoader::OnProgress(nsIRequest *aRequest, nsISupports* ctxt, // so update mMaxSelfProgress... Otherwise, set it to -1 to indicate // that the content-length is no longer known. // - if (nsUint64(aProgressMax) != LL_MAXUINT) { + if (PRUint64(aProgressMax) != LL_MAXUINT) { mMaxSelfProgress += PRInt64(aProgressMax); info->mMaxProgress = PRInt64(aProgressMax); } else { diff --git a/xpinstall/src/nsXPInstallManager.cpp b/xpinstall/src/nsXPInstallManager.cpp index df9709605ce..da3488f6d3d 100644 --- a/xpinstall/src/nsXPInstallManager.cpp +++ b/xpinstall/src/nsXPInstallManager.cpp @@ -1280,7 +1280,7 @@ nsXPInstallManager::OnProgress(nsIRequest* request, nsISupports *ctxt, PRUint64 if (NS_FAILED(rv)) return rv; } // XXX once channels support that, use 64-bit contentlength - rv = mDlg->OnProgress( mNextItem-1, aProgress, nsUint64(mContentLength) ); + rv = mDlg->OnProgress( mNextItem-1, aProgress, PRUint64(mContentLength) ); } return rv;