Merge m-c to inbound.

This commit is contained in:
Ryan VanderMeulen 2012-09-05 23:03:09 -04:00
commit c03d084401
104 changed files with 201 additions and 193 deletions

View File

@ -346,7 +346,7 @@ nsFeedSniffer::AppendSegmentToString(nsIInputStream* inputStream,
NS_IMETHODIMP
nsFeedSniffer::OnDataAvailable(nsIRequest* request, nsISupports* context,
nsIInputStream* stream, uint32_t offset,
nsIInputStream* stream, uint64_t offset,
uint32_t count)
{
uint32_t read;

View File

@ -165,7 +165,7 @@ NS_IMETHODIMP
FileIOObject::OnDataAvailable(nsIRequest *aRequest,
nsISupports *aContext,
nsIInputStream *aInputStream,
uint32_t aOffset,
uint64_t aOffset,
uint32_t aCount)
{
nsresult rv;

View File

@ -68,7 +68,7 @@ protected:
nsAString& aTerminationEvent) = 0;
// and for onDataAvailable
NS_IMETHOD DoOnDataAvailable(nsIRequest *aRequest, nsISupports *aContext,
nsIInputStream *aInputStream, uint32_t aOffset,
nsIInputStream *aInputStream, uint64_t aOffset,
uint32_t aCount) = 0;
void StartProgressEventTimer();

View File

@ -614,7 +614,7 @@ NS_IMETHODIMP
nsCORSListenerProxy::OnDataAvailable(nsIRequest* aRequest,
nsISupports* aContext,
nsIInputStream* aInputStream,
uint32_t aOffset,
uint64_t aOffset,
uint32_t aCount)
{
if (!mRequestApproved) {
@ -1006,7 +1006,7 @@ NS_IMETHODIMP
nsCORSPreflightListener::OnDataAvailable(nsIRequest *aRequest,
nsISupports *ctxt,
nsIInputStream *inStr,
uint32_t sourceOffset,
uint64_t sourceOffset,
uint32_t count)
{
uint32_t totalRead;

View File

@ -286,7 +286,7 @@ nsresult
nsDOMFileReader::DoOnDataAvailable(nsIRequest *aRequest,
nsISupports *aContext,
nsIInputStream *aInputStream,
uint32_t aOffset,
uint64_t aOffset,
uint32_t aCount)
{
if (mDataFormat == FILE_AS_BINARY) {
@ -294,6 +294,9 @@ nsDOMFileReader::DoOnDataAvailable(nsIRequest *aRequest,
NS_ASSERTION(mResult.Length() == aOffset,
"unexpected mResult length");
uint32_t oldLen = mResult.Length();
if (uint64_t(oldLen) + aCount > PR_UINT32_MAX)
return NS_ERROR_OUT_OF_MEMORY;
PRUnichar *buf = nullptr;
mResult.GetMutableData(&buf, oldLen + aCount, fallible_t());
NS_ENSURE_TRUE(buf, NS_ERROR_OUT_OF_MEMORY);
@ -311,6 +314,10 @@ nsDOMFileReader::DoOnDataAvailable(nsIRequest *aRequest,
}
else {
//Update memory buffer to reflect the contents of the file
if (aOffset + aCount > PR_UINT32_MAX) {
// PR_Realloc doesn't support over 4GB memory size even if 64-bit OS
return NS_ERROR_OUT_OF_MEMORY;
}
mFileData = (char *)PR_Realloc(mFileData, aOffset + aCount);
NS_ENSURE_TRUE(mFileData, NS_ERROR_OUT_OF_MEMORY);

View File

@ -57,7 +57,7 @@ public:
nsresult aStatus, nsAString& aSuccessEvent,
nsAString& aTerminationEvent);
NS_IMETHOD DoOnDataAvailable(nsIRequest* aRequest, nsISupports* aContext,
nsIInputStream* aInputStream, uint32_t aOffset,
nsIInputStream* aInputStream, uint64_t aOffset,
uint32_t aCount);
nsresult Init();

View File

@ -1023,7 +1023,7 @@ NS_IMETHODIMP
nsExternalResourceMap::PendingLoad::OnDataAvailable(nsIRequest* aRequest,
nsISupports* aContext,
nsIInputStream* aStream,
uint32_t aOffset,
uint64_t aOffset,
uint32_t aCount)
{
NS_PRECONDITION(mTargetListener, "Shouldn't be getting called!");

View File

@ -537,7 +537,7 @@ NS_IMETHODIMP
nsEventSource::OnDataAvailable(nsIRequest *aRequest,
nsISupports *aContext,
nsIInputStream *aInputStream,
uint32_t aOffset,
uint64_t aOffset,
uint32_t aCount)
{
NS_ENSURE_ARG_POINTER(aInputStream);

View File

@ -875,7 +875,7 @@ NS_IMETHODIMP
nsObjectLoadingContent::OnDataAvailable(nsIRequest *aRequest,
nsISupports *aContext,
nsIInputStream *aInputStream,
uint32_t aOffset, uint32_t aCount)
uint64_t aOffset, uint32_t aCount)
{
NS_ENSURE_TRUE(nsContentUtils::IsCallerChrome(), NS_ERROR_NOT_AVAILABLE);

View File

@ -274,7 +274,7 @@ NS_IMETHODIMP
nsMultipartProxyListener::OnDataAvailable(nsIRequest *aRequest,
nsISupports *ctxt,
nsIInputStream *inStr,
uint32_t sourceOffset,
uint64_t sourceOffset,
uint32_t count)
{
return mDestListener->OnDataAvailable(aRequest, ctxt, inStr, sourceOffset,
@ -1925,7 +1925,7 @@ NS_IMETHODIMP
nsXMLHttpRequest::OnDataAvailable(nsIRequest *request,
nsISupports *ctxt,
nsIInputStream *inStr,
uint32_t sourceOffset,
uint64_t sourceOffset,
uint32_t count)
{
NS_ENSURE_ARG_POINTER(inStr);

View File

@ -358,9 +358,12 @@ NS_IMETHODIMP nsHTMLMediaElement::MediaLoadListener::OnStopRequest(nsIRequest* a
return NS_OK;
}
NS_IMETHODIMP nsHTMLMediaElement::MediaLoadListener::OnDataAvailable(nsIRequest* aRequest, nsISupports* aContext,
nsIInputStream* aStream, uint32_t aOffset,
uint32_t aCount)
NS_IMETHODIMP
nsHTMLMediaElement::MediaLoadListener::OnDataAvailable(nsIRequest* aRequest,
nsISupports* aContext,
nsIInputStream* aStream,
uint64_t aOffset,
uint32_t aCount)
{
if (!mNextListener) {
NS_ERROR("Must have a chained listener; OnStartRequest should have canceled this request");

View File

@ -77,7 +77,7 @@ NS_IMETHODIMP
MediaDocumentStreamListener::OnDataAvailable(nsIRequest* request,
nsISupports *ctxt,
nsIInputStream *inStr,
uint32_t sourceOffset,
uint64_t sourceOffset,
uint32_t count)
{
if (mNextStream) {

View File

@ -88,7 +88,7 @@ nsresult
ChannelMediaResource::Listener::OnDataAvailable(nsIRequest* aRequest,
nsISupports* aContext,
nsIInputStream* aStream,
uint32_t aOffset,
uint64_t aOffset,
uint32_t aCount)
{
if (!mResource)

View File

@ -233,8 +233,9 @@ nsXBLStreamListener::~nsXBLStreamListener()
}
NS_IMETHODIMP
nsXBLStreamListener::OnDataAvailable(nsIRequest *request, nsISupports* aCtxt, nsIInputStream* aInStr,
uint32_t aSourceOffset, uint32_t aCount)
nsXBLStreamListener::OnDataAvailable(nsIRequest *request, nsISupports* aCtxt,
nsIInputStream* aInStr,
uint64_t aSourceOffset, uint32_t aCount)
{
if (mInner)
return mInner->OnDataAvailable(request, aCtxt, aInStr, aSourceOffset, aCount);

View File

@ -223,7 +223,7 @@ txStylesheetSink::DidBuildModel(bool aTerminated)
NS_IMETHODIMP
txStylesheetSink::OnDataAvailable(nsIRequest *aRequest, nsISupports *aContext,
nsIInputStream *aInputStream,
uint32_t aOffset, uint32_t aCount)
uint64_t aOffset, uint32_t aCount)
{
if (!mCheckedForXML) {
nsCOMPtr<nsIParser> parser = do_QueryInterface(aContext);

View File

@ -4500,7 +4500,7 @@ NS_IMETHODIMP
nsXULDocument::CachedChromeStreamListener::OnDataAvailable(nsIRequest *request,
nsISupports* aContext,
nsIInputStream* aInStr,
uint32_t aSourceOffset,
uint64_t aSourceOffset,
uint32_t aCount)
{
NS_NOTREACHED("CachedChromeStream doesn't receive data");

View File

@ -439,7 +439,7 @@ nsPingListener::OnStartRequest(nsIRequest *request, nsISupports *context)
NS_IMETHODIMP
nsPingListener::OnDataAvailable(nsIRequest *request, nsISupports *context,
nsIInputStream *stream, uint32_t offset,
nsIInputStream *stream, uint64_t offset,
uint32_t count)
{
uint32_t result;

View File

@ -218,7 +218,9 @@ CachedFileHolder::Release()
NS_IMETHODIMP
nsPluginByteRangeStreamListener::OnDataAvailable(nsIRequest *request, nsISupports *ctxt,
nsIInputStream *inStr, uint32_t sourceOffset, uint32_t count)
nsIInputStream *inStr,
uint64_t sourceOffset,
uint32_t count)
{
if (!mStreamConverter)
return NS_ERROR_FAILURE;
@ -849,7 +851,7 @@ nsPluginStreamListenerPeer::UseExistingPluginCacheFile(nsPluginStreamListenerPee
NS_IMETHODIMP nsPluginStreamListenerPeer::OnDataAvailable(nsIRequest *request,
nsISupports* aContext,
nsIInputStream *aIStream,
uint32_t sourceOffset,
uint64_t sourceOffset,
uint32_t aLength)
{
NS_ASSERTION(mRequests.IndexOfObject(GetBaseRequest(request)) != -1,
@ -880,7 +882,7 @@ NS_IMETHODIMP nsPluginStreamListenerPeer::OnDataAvailable(nsIRequest *request,
GetURL(&url);
PLUGIN_LOG(PLUGIN_LOG_NOISY,
("nsPluginStreamListenerPeer::OnDataAvailable this=%p request=%p, offset=%d, length=%d, url=%s\n",
("nsPluginStreamListenerPeer::OnDataAvailable this=%p request=%p, offset=%llu, length=%u, url=%s\n",
this, request, sourceOffset, aLength, url ? url : "no url set"));
// if the plugin has requested an AsFileOnly stream, then don't

View File

@ -455,7 +455,7 @@ nsJSON::DecodeInternal(JSContext* cx,
rv = jsonListener->OnDataAvailable(jsonChannel, nullptr,
aStream,
(uint32_t)NS_MIN(offset, (uint64_t)PR_UINT32_MAX),
offset,
(uint32_t)available);
if (NS_FAILED(rv)) {
jsonChannel->Cancel(rv);
@ -586,7 +586,7 @@ nsJSONListener::OnStopRequest(nsIRequest *aRequest, nsISupports *aContext,
NS_IMETHODIMP
nsJSONListener::OnDataAvailable(nsIRequest *aRequest, nsISupports *aContext,
nsIInputStream *aStream,
uint32_t aOffset, uint32_t aLength)
uint64_t aOffset, uint32_t aLength)
{
nsresult rv = NS_OK;

View File

@ -1044,7 +1044,7 @@ NS_IMETHODIMP
nsJSChannel::OnDataAvailable(nsIRequest* aRequest,
nsISupports* aContext,
nsIInputStream* aInputStream,
uint32_t aOffset,
uint64_t aOffset,
uint32_t aCount)
{
NS_ENSURE_TRUE(aRequest == mStreamChannel, NS_ERROR_UNEXPECTED);

View File

@ -779,9 +779,10 @@ NS_IMETHODIMP nsWebBrowserPersist::OnStopRequest(
// nsWebBrowserPersist::nsIStreamListener
//*****************************************************************************
NS_IMETHODIMP nsWebBrowserPersist::OnDataAvailable(
NS_IMETHODIMP
nsWebBrowserPersist::OnDataAvailable(
nsIRequest* request, nsISupports *aContext, nsIInputStream *aIStream,
uint32_t aOffset, uint32_t aLength)
uint64_t aOffset, uint32_t aLength)
{
bool cancel = mCancel;
if (!cancel)

View File

@ -96,7 +96,7 @@ NS_IMETHODIMP
nsAutoConfig::OnDataAvailable(nsIRequest *request,
nsISupports *context,
nsIInputStream *aIStream,
uint32_t aSourceOffset,
uint64_t aSourceOffset,
uint32_t aLength)
{
uint32_t amt, size;

View File

@ -109,7 +109,7 @@ NS_IMETHODIMP nsIconChannel::OnStopRequest(nsIRequest* aRequest, nsISupports* aC
NS_IMETHODIMP nsIconChannel::OnDataAvailable(nsIRequest* aRequest,
nsISupports* aContext,
nsIInputStream* aStream,
uint32_t aOffset,
uint64_t aOffset,
uint32_t aCount)
{
if (mListener)

View File

@ -691,7 +691,7 @@ NS_IMETHODIMP nsIconChannel::OnStopRequest(nsIRequest* aRequest, nsISupports* aC
NS_IMETHODIMP nsIconChannel::OnDataAvailable(nsIRequest* aRequest,
nsISupports* aContext,
nsIInputStream* aStream,
uint32_t aOffset,
uint64_t aOffset,
uint32_t aCount)
{
if (mListener)

View File

@ -704,7 +704,7 @@ NS_IMETHODIMP nsIconChannel::OnStopRequest(nsIRequest* aRequest, nsISupports* aC
NS_IMETHODIMP nsIconChannel::OnDataAvailable(nsIRequest* aRequest,
nsISupports* aContext,
nsIInputStream* aStream,
uint32_t aOffset,
uint64_t aOffset,
uint32_t aCount)
{
if (mListener)

View File

@ -209,7 +209,7 @@ SVGDocumentWrapper::ResetAnimation()
NS_IMETHODIMP
SVGDocumentWrapper::OnDataAvailable(nsIRequest* aRequest, nsISupports* ctxt,
nsIInputStream* inStr,
uint32_t sourceOffset,
uint64_t sourceOffset,
uint32_t count)
{
return mListener->OnDataAvailable(aRequest, ctxt, inStr,

View File

@ -693,7 +693,7 @@ VectorImage::OnStopRequest(nsIRequest* aRequest, nsISupports* aCtxt,
in unsigned long count); */
NS_IMETHODIMP
VectorImage::OnDataAvailable(nsIRequest* aRequest, nsISupports* aCtxt,
nsIInputStream* aInStr, uint32_t aSourceOffset,
nsIInputStream* aInStr, uint64_t aSourceOffset,
uint32_t aCount)
{
if (mError)

View File

@ -2083,8 +2083,11 @@ NS_IMETHODIMP ProxyListener::OnStopRequest(nsIRequest *aRequest, nsISupports *ct
/** nsIStreamListener methods **/
/* void onDataAvailable (in nsIRequest request, in nsISupports ctxt, in nsIInputStream inStr, in unsigned long sourceOffset, in unsigned long count); */
NS_IMETHODIMP ProxyListener::OnDataAvailable(nsIRequest *aRequest, nsISupports *ctxt, nsIInputStream *inStr, uint32_t sourceOffset, uint32_t count)
/* void onDataAvailable (in nsIRequest request, in nsISupports ctxt, in nsIInputStream inStr, in unsigned long long sourceOffset, in unsigned long count); */
NS_IMETHODIMP
ProxyListener::OnDataAvailable(nsIRequest *aRequest, nsISupports *ctxt,
nsIInputStream *inStr, uint64_t sourceOffset,
uint32_t count)
{
if (!mDestListener)
return NS_ERROR_FAILURE;
@ -2249,8 +2252,11 @@ NS_IMETHODIMP imgCacheValidator::OnStopRequest(nsIRequest *aRequest, nsISupports
/** nsIStreamListener methods **/
/* void onDataAvailable (in nsIRequest request, in nsISupports ctxt, in nsIInputStream inStr, in unsigned long sourceOffset, in unsigned long count); */
NS_IMETHODIMP imgCacheValidator::OnDataAvailable(nsIRequest *aRequest, nsISupports *ctxt, nsIInputStream *inStr, uint32_t sourceOffset, uint32_t count)
/* void onDataAvailable (in nsIRequest request, in nsISupports ctxt, in nsIInputStream inStr, in unsigned long long sourceOffset, in unsigned long count); */
NS_IMETHODIMP
imgCacheValidator::OnDataAvailable(nsIRequest *aRequest, nsISupports *ctxt,
nsIInputStream *inStr,
uint64_t sourceOffset, uint32_t count)
{
if (!mDestListener) {
// XXX see bug 113959

View File

@ -941,8 +941,11 @@ static NS_METHOD sniff_mimetype_callback(nsIInputStream* in, void* closure, cons
/** nsIStreamListener methods **/
/* void onDataAvailable (in nsIRequest request, in nsISupports ctxt, in nsIInputStream inStr, in unsigned long sourceOffset, in unsigned long count); */
NS_IMETHODIMP imgRequest::OnDataAvailable(nsIRequest *aRequest, nsISupports *ctxt, nsIInputStream *inStr, uint32_t sourceOffset, uint32_t count)
/* void onDataAvailable (in nsIRequest request, in nsISupports ctxt, in nsIInputStream inStr, in unsigned long long sourceOffset, in unsigned long count); */
NS_IMETHODIMP
imgRequest::OnDataAvailable(nsIRequest *aRequest, nsISupports *ctxt,
nsIInputStream *inStr, uint64_t sourceOffset,
uint32_t count)
{
LOG_SCOPE_WITH_PARAM(gImgLog, "imgRequest::OnDataAvailable", "count", count);

View File

@ -895,7 +895,7 @@ nsJARChannel::OnStopRequest(nsIRequest *req, nsISupports *ctx, nsresult status)
NS_IMETHODIMP
nsJARChannel::OnDataAvailable(nsIRequest *req, nsISupports *ctx,
nsIInputStream *stream,
uint32_t offset, uint32_t count)
uint64_t offset, uint32_t count)
{
#if defined(PR_LOGGING)
LOG(("nsJARChannel::OnDataAvailable [this=%x %s]\n", this, mSpec.get()));
@ -909,7 +909,7 @@ 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, nullptr, uint64_t(offset + count),
mProgressSink->OnProgress(this, nullptr, offset + count,
uint64_t(mContentLength));
return rv; // let the pump cancel on failure

View File

@ -102,11 +102,12 @@ NS_IMETHODIMP nsDeflateConverter::AsyncConvertData(const char *aFromType,
/* void onDataAvailable (in nsIRequest aRequest, in nsISupports aContext,
* in nsIInputStream aInputStream,
* in unsigned long aOffset, in unsigned long aCount); */
* in unsigned long long aOffset,
* in unsigned long aCount); */
NS_IMETHODIMP nsDeflateConverter::OnDataAvailable(nsIRequest *aRequest,
nsISupports *aContext,
nsIInputStream *aInputStream,
uint32_t aOffset,
uint64_t aOffset,
uint32_t aCount)
{
if (!mListener)

View File

@ -50,7 +50,7 @@ private:
};
WrapMode mWrapMode;
uint32_t mOffset;
uint64_t mOffset;
int32_t mLevel;
nsCOMPtr<nsIStreamListener> mListener;
nsCOMPtr<nsISupports> mContext;

View File

@ -61,11 +61,11 @@ nsresult nsZipDataStream::Init(nsZipWriter *aWriter,
/* void onDataAvailable (in nsIRequest aRequest, in nsISupports aContext,
* in nsIInputStream aInputStream,
* in unsigned long aOffset, in unsigned long aCount); */
* in unsigned long long aOffset, in unsigned long aCount); */
NS_IMETHODIMP nsZipDataStream::OnDataAvailable(nsIRequest *aRequest,
nsISupports *aContext,
nsIInputStream *aInputStream,
uint32_t aOffset,
uint64_t aOffset,
uint32_t aCount)
{
if (!mOutput)
@ -132,7 +132,7 @@ inline nsresult nsZipDataStream::CompleteEntry()
nsresult nsZipDataStream::ProcessData(nsIRequest *aRequest,
nsISupports *aContext, char *aBuffer,
uint32_t aOffset, uint32_t aCount)
uint64_t aOffset, uint32_t aCount)
{
mHeader->mCRC = crc32(mHeader->mCRC,
reinterpret_cast<const unsigned char*>(aBuffer),

View File

@ -37,7 +37,7 @@ private:
nsresult CompleteEntry();
nsresult ProcessData(nsIRequest *aRequest, nsISupports *aContext,
char *aBuffer, uint32_t aOffset, uint32_t aCount);
char *aBuffer, uint64_t aOffset, uint32_t aCount);
};
#endif

View File

@ -10,7 +10,7 @@ interface nsIInputStream;
/**
* nsIStreamListener
*/
[scriptable, uuid(1a637020-1482-11d3-9333-00104ba0fd40)]
[scriptable, uuid(3b4c8a77-76ba-4610-b316-678c73a3b88c)]
interface nsIStreamListener : nsIRequestObserver
{
/**
@ -25,8 +25,6 @@ interface nsIStreamListener : nsIRequestObserver
* Number of bytes that were sent in previous onDataAvailable calls
* for this request. In other words, the sum of all previous count
* parameters.
* If that number is greater than or equal to 2^32, this parameter
* will be PR_UINT32_MAX (2^32 - 1).
* @param aCount number of bytes available in the stream
*
* NOTE: The aInputStream parameter must implement readSegments.
@ -37,6 +35,6 @@ interface nsIStreamListener : nsIRequestObserver
void onDataAvailable(in nsIRequest aRequest,
in nsISupports aContext,
in nsIInputStream aInputStream,
in unsigned long aOffset,
in unsigned long long aOffset,
in unsigned long aCount);
};

View File

@ -738,7 +738,7 @@ nsBaseChannel::OnStopRequest(nsIRequest *request, nsISupports *ctxt,
NS_IMETHODIMP
nsBaseChannel::OnDataAvailable(nsIRequest *request, nsISupports *ctxt,
nsIInputStream *stream, uint32_t offset,
nsIInputStream *stream, uint64_t offset,
uint32_t count)
{
SUSPEND_PUMP_FOR_SCOPE();
@ -746,7 +746,7 @@ nsBaseChannel::OnDataAvailable(nsIRequest *request, nsISupports *ctxt,
nsresult rv = mListener->OnDataAvailable(this, mListenerContext, stream,
offset, count);
if (mSynthProgressEvents && NS_SUCCEEDED(rv)) {
uint64_t prog = uint64_t(offset) + count;
uint64_t prog = offset + count;
uint64_t progMax = ContentLength64();
OnTransportStatus(nullptr, NS_NET_STATUS_READING, prog, progMax);
}

View File

@ -126,7 +126,7 @@ nsDownloader::ConsumeData(nsIInputStream* in,
NS_IMETHODIMP
nsDownloader::OnDataAvailable(nsIRequest *request, nsISupports *ctxt,
nsIInputStream *inStr,
uint32_t sourceOffset, uint32_t count)
uint64_t sourceOffset, uint32_t count)
{
uint32_t n;
return inStr->ReadSegments(ConsumeData, this, count, &n);

View File

@ -652,7 +652,7 @@ NS_IMETHODIMP
nsIncrementalDownload::OnDataAvailable(nsIRequest *request,
nsISupports *context,
nsIInputStream *input,
uint32_t offset,
uint64_t offset,
uint32_t count)
{
while (count) {

View File

@ -472,22 +472,15 @@ nsInputStreamPump::OnStateTransfer()
offsetBefore = 0;
}
// report the current stream offset to our listener... if we've
// streamed more than PR_UINT32_MAX, then avoid overflowing the
// stream offset. it's the best we can do without a 64-bit stream
// listener API.
uint32_t odaOffset =
mStreamOffset > PR_UINT32_MAX ?
PR_UINT32_MAX : uint32_t(mStreamOffset);
uint32_t odaAvail =
avail > PR_UINT32_MAX ?
PR_UINT32_MAX : uint32_t(avail);
LOG((" calling OnDataAvailable [offset=%lld(%u) count=%llu(%u)]\n",
mStreamOffset, odaOffset, avail, odaAvail));
LOG((" calling OnDataAvailable [offset=%llu count=%llu(%u)]\n",
mStreamOffset, avail, odaAvail));
rv = mListener->OnDataAvailable(this, mListenerContext, mAsyncStream,
odaOffset, odaAvail);
mStreamOffset, odaAvail);
// don't enter this code if ODA failed or called Cancel
if (NS_SUCCEEDED(rv) && NS_SUCCEEDED(mStatus)) {

View File

@ -46,7 +46,7 @@ NS_IMETHODIMP
nsSimpleStreamListener::OnDataAvailable(nsIRequest* request,
nsISupports *aContext,
nsIInputStream *aSource,
uint32_t aOffset,
uint64_t aOffset,
uint32_t aCount)
{
uint32_t writeCount;

View File

@ -57,7 +57,7 @@ NS_IMETHODIMP
nsStreamListenerTee::OnDataAvailable(nsIRequest *request,
nsISupports *context,
nsIInputStream *input,
uint32_t offset,
uint64_t offset,
uint32_t count)
{
NS_ENSURE_TRUE(mListener, NS_ERROR_NOT_INITIALIZED);

View File

@ -144,7 +144,7 @@ nsStreamLoader::WriteSegmentFun(nsIInputStream *inStr,
NS_IMETHODIMP
nsStreamLoader::OnDataAvailable(nsIRequest* request, nsISupports *ctxt,
nsIInputStream *inStr,
uint32_t sourceOffset, uint32_t count)
uint64_t sourceOffset, uint32_t count)
{
uint32_t countRead;
return inStr->ReadSegments(WriteSegmentFun, this, count, &countRead);

View File

@ -64,7 +64,7 @@ NS_IMETHODIMP
nsSyncStreamListener::OnDataAvailable(nsIRequest *request,
nsISupports *context,
nsIInputStream *stream,
uint32_t offset,
uint64_t offset,
uint32_t count)
{
uint32_t bytesWritten;

View File

@ -310,7 +310,7 @@ nsURIChecker::OnStopRequest(nsIRequest *request, nsISupports *ctxt,
NS_IMETHODIMP
nsURIChecker::OnDataAvailable(nsIRequest *aRequest, nsISupports *aCtxt,
nsIInputStream *aInput, uint32_t aOffset,
nsIInputStream *aInput, uint64_t aOffset,
uint32_t aCount)
{
NS_NOTREACHED("nsURIChecker::OnDataAvailable");

View File

@ -106,7 +106,7 @@ NS_IMETHODIMP
nsUnicharStreamLoader::OnDataAvailable(nsIRequest *aRequest,
nsISupports *aContext,
nsIInputStream *aInputStream,
uint32_t aSourceOffset,
uint64_t aSourceOffset,
uint32_t aCount)
{
if (!mObserver) {

View File

@ -268,18 +268,19 @@ class FTPDataAvailableEvent : public ChannelEvent
{
public:
FTPDataAvailableEvent(FTPChannelChild* aChild, const nsCString& aData,
const uint32_t& aOffset, const uint32_t& aCount)
const uint64_t& aOffset, const uint32_t& aCount)
: mChild(aChild), mData(aData), mOffset(aOffset), mCount(aCount) {}
void Run() { mChild->DoOnDataAvailable(mData, mOffset, mCount); }
private:
FTPChannelChild* mChild;
nsCString mData;
uint32_t mOffset, mCount;
uint64_t mOffset;
uint32_t mCount;
};
bool
FTPChannelChild::RecvOnDataAvailable(const nsCString& data,
const uint32_t& offset,
const uint64_t& offset,
const uint32_t& count)
{
if (mEventQ.ShouldEnqueue()) {
@ -292,7 +293,7 @@ FTPChannelChild::RecvOnDataAvailable(const nsCString& data,
void
FTPChannelChild::DoOnDataAvailable(const nsCString& data,
const uint32_t& offset,
const uint64_t& offset,
const uint32_t& count)
{
LOG(("FTPChannelChild::RecvOnDataAvailable [this=%x]\n", this));

View File

@ -74,7 +74,7 @@ protected:
const nsCString& aEntityID,
const URIParams& aURI) MOZ_OVERRIDE;
bool RecvOnDataAvailable(const nsCString& data,
const uint32_t& offset,
const uint64_t& offset,
const uint32_t& count) MOZ_OVERRIDE;
bool RecvOnStopRequest(const nsresult& statusCode) MOZ_OVERRIDE;
bool RecvFailedAsyncOpen(const nsresult& statusCode) MOZ_OVERRIDE;
@ -86,7 +86,7 @@ protected:
const nsCString& aEntityID,
const URIParams& aURI);
void DoOnDataAvailable(const nsCString& data,
const uint32_t& offset,
const uint64_t& offset,
const uint32_t& count);
void DoOnStopRequest(const nsresult& statusCode);
void DoFailedAsyncOpen(const nsresult& statusCode);

View File

@ -204,7 +204,7 @@ NS_IMETHODIMP
FTPChannelParent::OnDataAvailable(nsIRequest* aRequest,
nsISupports* aContext,
nsIInputStream* aInputStream,
uint32_t aOffset,
uint64_t aOffset,
uint32_t aCount)
{
LOG(("FTPChannelParent::OnDataAvailable [this=%x]\n", this));

View File

@ -38,7 +38,7 @@ parent:
child:
OnStartRequest(int32_t aContentLength, nsCString aContentType,
PRTime aLastModified, nsCString aEntityID, URIParams aURI);
OnDataAvailable(nsCString data, uint32_t offset, uint32_t count);
OnDataAvailable(nsCString data, uint64_t offset, uint32_t count);
OnStopRequest(nsresult statusCode);
FailedAsyncOpen(nsresult statusCode);
DeleteSelf();

View File

@ -297,7 +297,7 @@ class TransportAndDataEvent : public ChannelEvent
const uint64_t& progress,
const uint64_t& progressMax,
const nsCString& data,
const uint32_t& offset,
const uint64_t& offset,
const uint32_t& count)
: mChild(child)
, mStatus(status)
@ -315,7 +315,7 @@ class TransportAndDataEvent : public ChannelEvent
uint64_t mProgress;
uint64_t mProgressMax;
nsCString mData;
uint32_t mOffset;
uint64_t mOffset;
uint32_t mCount;
};
@ -324,7 +324,7 @@ HttpChannelChild::RecvOnTransportAndData(const nsresult& status,
const uint64_t& progress,
const uint64_t& progressMax,
const nsCString& data,
const uint32_t& offset,
const uint64_t& offset,
const uint32_t& count)
{
if (mEventQ.ShouldEnqueue()) {
@ -342,7 +342,7 @@ HttpChannelChild::OnTransportAndData(const nsresult& status,
const uint64_t progress,
const uint64_t& progressMax,
const nsCString& data,
const uint32_t& offset,
const uint64_t& offset,
const uint32_t& count)
{
LOG(("HttpChannelChild::OnTransportAndData [this=%x]\n", this));

View File

@ -103,7 +103,7 @@ protected:
const uint64_t& progress,
const uint64_t& progressMax,
const nsCString& data,
const uint32_t& offset,
const uint64_t& offset,
const uint32_t& count);
bool RecvOnStopRequest(const nsresult& statusCode);
bool RecvOnProgress(const uint64_t& progress, const uint64_t& progressMax);
@ -157,7 +157,7 @@ private:
const uint64_t progress,
const uint64_t& progressMax,
const nsCString& data,
const uint32_t& offset,
const uint64_t& offset,
const uint32_t& count);
void OnStopRequest(const nsresult& statusCode);
void OnProgress(const uint64_t& progress, const uint64_t& progressMax);

View File

@ -467,7 +467,7 @@ NS_IMETHODIMP
HttpChannelParent::OnDataAvailable(nsIRequest *aRequest,
nsISupports *aContext,
nsIInputStream *aInputStream,
uint32_t aOffset,
uint64_t aOffset,
uint32_t aCount)
{
LOG(("HttpChannelParent::OnDataAvailable [this=%x]\n", this));

View File

@ -89,7 +89,7 @@ NS_IMETHODIMP
HttpChannelParentListener::OnDataAvailable(nsIRequest *aRequest,
nsISupports *aContext,
nsIInputStream *aInputStream,
uint32_t aOffset,
uint64_t aOffset,
uint32_t aCount)
{
if (!mActiveChannel)

View File

@ -114,7 +114,7 @@ child:
uint64_t progress,
uint64_t progressMax,
nsCString data,
uint32_t offset,
uint64_t offset,
uint32_t count);
OnStopRequest(nsresult statusCode);

View File

@ -5016,10 +5016,10 @@ nsHttpChannel::OnStopRequest(nsIRequest *request, nsISupports *ctxt, nsresult st
NS_IMETHODIMP
nsHttpChannel::OnDataAvailable(nsIRequest *request, nsISupports *ctxt,
nsIInputStream *input,
uint32_t offset, uint32_t count)
uint64_t offset, uint32_t count)
{
SAMPLE_LABEL("network", "nsHttpChannel::OnDataAvailable");
LOG(("nsHttpChannel::OnDataAvailable [this=%p request=%p offset=%u count=%u]\n",
LOG(("nsHttpChannel::OnDataAvailable [this=%p request=%p offset=%llu count=%u]\n",
this, request, offset, count));
// don't send out OnDataAvailable notifications if we've been canceled.
@ -5066,17 +5066,10 @@ nsHttpChannel::OnDataAvailable(nsIRequest *request, nsISupports *ctxt,
// OnDoneReadingPartialCacheEntry).
//
// report the current stream offset to our listener... if we've
// streamed more than PR_UINT32_MAX, then avoid overflowing the
// stream offset. it's the best we can do without a 64-bit stream
// listener API. (Copied from nsInputStreamPump::OnStateTransfer.)
uint32_t odaOffset = mLogicalOffset > PR_UINT32_MAX
? PR_UINT32_MAX : uint32_t(mLogicalOffset);
nsresult rv = mListener->OnDataAvailable(this,
mListenerContext,
input,
odaOffset,
mLogicalOffset,
count);
if (NS_SUCCEEDED(rv))
mLogicalOffset = progress;

View File

@ -497,8 +497,9 @@ nsViewSourceChannel::OnStopRequest(nsIRequest *aRequest, nsISupports* aContext,
// nsIStreamListener methods
NS_IMETHODIMP
nsViewSourceChannel::OnDataAvailable(nsIRequest *aRequest, nsISupports* aContext,
nsIInputStream *aInputStream, uint32_t aSourceOffset,
uint32_t aLength)
nsIInputStream *aInputStream,
uint64_t aSourceOffset,
uint32_t aLength)
{
NS_ENSURE_TRUE(mListener, NS_ERROR_FAILURE);
return mListener->OnDataAvailable(static_cast<nsIViewSourceChannel*>

View File

@ -3050,10 +3050,10 @@ NS_IMETHODIMP
WebSocketChannel::OnDataAvailable(nsIRequest *aRequest,
nsISupports *aContext,
nsIInputStream *aInputStream,
uint32_t aOffset,
uint64_t aOffset,
uint32_t aCount)
{
LOG(("WebSocketChannel::OnDataAvailable() %p [%p %p %p %u %u]\n",
LOG(("WebSocketChannel::OnDataAvailable() %p [%p %p %p %llu %u]\n",
this, aRequest, aContext, aInputStream, aOffset, aCount));
if (aContext == mSocketIn) {

View File

@ -40,7 +40,7 @@ child:
nsCString securityInfo);
OnDataAvailable(nsCString data,
uint32_t offset);
uint64_t offset);
OnStopRequest(nsresult statusCode);

View File

@ -154,18 +154,18 @@ class WyciwygDataAvailableEvent : public ChannelEvent
public:
WyciwygDataAvailableEvent(WyciwygChannelChild* child,
const nsCString& data,
const uint32_t& offset)
const uint64_t& offset)
: mChild(child), mData(data), mOffset(offset) {}
void Run() { mChild->OnDataAvailable(mData, mOffset); }
private:
WyciwygChannelChild* mChild;
nsCString mData;
uint32_t mOffset;
uint64_t mOffset;
};
bool
WyciwygChannelChild::RecvOnDataAvailable(const nsCString& data,
const uint32_t& offset)
const uint64_t& offset)
{
if (mEventQ.ShouldEnqueue()) {
mEventQ.Enqueue(new WyciwygDataAvailableEvent(this, data, offset));
@ -177,7 +177,7 @@ WyciwygChannelChild::RecvOnDataAvailable(const nsCString& data,
void
WyciwygChannelChild::OnDataAvailable(const nsCString& data,
const uint32_t& offset)
const uint64_t& offset)
{
LOG(("WyciwygChannelChild::RecvOnDataAvailable [this=%x]\n", this));
@ -209,7 +209,7 @@ WyciwygChannelChild::OnDataAvailable(const nsCString& data,
Cancel(rv);
if (mProgressSink && NS_SUCCEEDED(rv) && !(mLoadFlags & LOAD_BACKGROUND))
mProgressSink->OnProgress(this, nullptr, uint64_t(offset + data.Length()),
mProgressSink->OnProgress(this, nullptr, offset + data.Length(),
uint64_t(mContentLength));
}

View File

@ -58,7 +58,7 @@ protected:
const nsCString& charset,
const nsCString& securityInfo);
bool RecvOnDataAvailable(const nsCString& data,
const uint32_t& offset);
const uint64_t& offset);
bool RecvOnStopRequest(const nsresult& statusCode);
bool RecvCancelEarly(const nsresult& statusCode);
@ -68,7 +68,7 @@ protected:
const nsCString& charset,
const nsCString& securityInfo);
void OnDataAvailable(const nsCString& data,
const uint32_t& offset);
const uint64_t& offset);
void OnStopRequest(const nsresult& statusCode);
void CancelEarly(const nsresult& statusCode);

View File

@ -233,7 +233,7 @@ NS_IMETHODIMP
WyciwygChannelParent::OnDataAvailable(nsIRequest *aRequest,
nsISupports *aContext,
nsIInputStream *aInputStream,
uint32_t aOffset,
uint64_t aOffset,
uint32_t aCount)
{
LOG(("WyciwygChannelParent::OnDataAvailable [this=%x]\n", this));

View File

@ -593,9 +593,9 @@ nsWyciwygChannel::OnCacheEntryDoomed(nsresult status)
NS_IMETHODIMP
nsWyciwygChannel::OnDataAvailable(nsIRequest *request, nsISupports *ctx,
nsIInputStream *input,
uint32_t offset, uint32_t count)
uint64_t offset, uint32_t count)
{
LOG(("nsWyciwygChannel::OnDataAvailable [this=%x request=%x offset=%u count=%u]\n",
LOG(("nsWyciwygChannel::OnDataAvailable [this=%x request=%x offset=%llu count=%u]\n",
this, request, offset, count));
nsresult rv;
@ -604,7 +604,7 @@ nsWyciwygChannel::OnDataAvailable(nsIRequest *request, nsISupports *ctx,
// XXX handle 64-bit stuff for real
if (mProgressSink && NS_SUCCEEDED(rv) && !(mLoadFlags & LOAD_BACKGROUND))
mProgressSink->OnProgress(this, nullptr, uint64_t(offset + count),
mProgressSink->OnProgress(this, nullptr, offset + count,
uint64_t(mContentLength));
return rv; // let the pump cancel on failure

View File

@ -1304,7 +1304,7 @@ mozTXTToHTMLConv::AsyncConvertData(const char *aFromType,
NS_IMETHODIMP
mozTXTToHTMLConv::OnDataAvailable(nsIRequest* request, nsISupports *ctxt,
nsIInputStream *inStr, uint32_t sourceOffset,
nsIInputStream *inStr, uint64_t sourceOffset,
uint32_t count)
{
return NS_ERROR_NOT_IMPLEMENTED;

View File

@ -120,7 +120,7 @@ NS_IMETHODIMP
nsBinHexDecoder::OnDataAvailable(nsIRequest* request,
nsISupports *aCtxt,
nsIInputStream *aStream,
uint32_t aSourceOffset,
uint64_t aSourceOffset,
uint32_t aCount)
{
nsresult rv = NS_OK;

View File

@ -345,7 +345,7 @@ nsDirIndexParser::ParseData(nsIDirIndex *aIdx, char* aDataStr) {
NS_IMETHODIMP
nsDirIndexParser::OnDataAvailable(nsIRequest *aRequest, nsISupports *aCtxt,
nsIInputStream *aStream,
uint32_t aSourceOffset,
uint64_t aSourceOffset,
uint32_t aCount) {
if (aCount < 1)
return NS_OK;

View File

@ -77,7 +77,7 @@ nsFTPDirListingConv::AsyncConvertData(const char *aFromType, const char *aToType
// nsIStreamListener implementation
NS_IMETHODIMP
nsFTPDirListingConv::OnDataAvailable(nsIRequest* request, nsISupports *ctxt,
nsIInputStream *inStr, uint32_t sourceOffset, uint32_t count) {
nsIInputStream *inStr, uint64_t sourceOffset, uint32_t count) {
NS_ASSERTION(request, "FTP dir listing stream converter needs a request");
nsresult rv;
@ -101,7 +101,7 @@ nsFTPDirListingConv::OnDataAvailable(nsIRequest* request, nsISupports *ctxt,
// the dir listings are ascii text, null terminate this sucker.
buffer[streamLen] = '\0';
PR_LOG(gFTPDirListConvLog, PR_LOG_DEBUG, ("nsFTPDirListingConv::OnData(request = %x, ctxt = %x, inStr = %x, sourceOffset = %d, count = %d)\n", request, ctxt, inStr, sourceOffset, count));
PR_LOG(gFTPDirListConvLog, PR_LOG_DEBUG, ("nsFTPDirListingConv::OnData(request = %x, ctxt = %x, inStr = %x, sourceOffset = %llu, count = %u)\n", request, ctxt, inStr, sourceOffset, count));
if (!mBuffer.IsEmpty()) {
// we have data left over from a previous OnDataAvailable() call.

View File

@ -98,7 +98,7 @@ NS_IMETHODIMP
nsHTTPCompressConv::OnDataAvailable(nsIRequest* request,
nsISupports *aContext,
nsIInputStream *iStr,
uint32_t aSourceOffset,
uint64_t aSourceOffset,
uint32_t aCount)
{
nsresult rv = NS_ERROR_INVALID_CONTENT_ENCODING;
@ -329,7 +329,7 @@ nsHTTPCompressConv::Convert(nsIInputStream *aFromStream,
nsresult
nsHTTPCompressConv::do_OnDataAvailable(nsIRequest* request,
nsISupports *context, uint32_t offset,
nsISupports *context, uint64_t offset,
const char *buffer, uint32_t count)
{
if (!mStream) {

View File

@ -67,7 +67,7 @@ private:
nsCOMPtr<nsIStringInputStream> mStream;
nsresult do_OnDataAvailable (nsIRequest *request, nsISupports *aContext,
uint32_t aSourceOffset, const char *buffer,
uint64_t aSourceOffset, const char *buffer,
uint32_t aCount);
bool mCheckHeaderDone;

View File

@ -748,7 +748,7 @@ NS_IMETHODIMP
nsIndexedToHTML::OnDataAvailable(nsIRequest *aRequest,
nsISupports *aCtxt,
nsIInputStream* aInput,
uint32_t aOffset,
uint64_t aOffset,
uint32_t aCount) {
return mParser->OnDataAvailable(aRequest, aCtxt, aInput, aOffset, aCount);
}

View File

@ -74,7 +74,7 @@ nsresult nsPartChannel::SendOnStartRequest(nsISupports* aContext)
nsresult nsPartChannel::SendOnDataAvailable(nsISupports* aContext,
nsIInputStream* aStream,
uint32_t aOffset, uint32_t aLen)
uint64_t aOffset, uint32_t aLen)
{
return mListener->OnDataAvailable(this, aContext, aStream, aOffset, aLen);
}
@ -458,7 +458,8 @@ private:
// nsIStreamListener implementation
NS_IMETHODIMP
nsMultiMixedConv::OnDataAvailable(nsIRequest *request, nsISupports *context,
nsIInputStream *inStr, uint32_t sourceOffset, uint32_t count) {
nsIInputStream *inStr, uint64_t sourceOffset,
uint32_t count) {
if (mToken.IsEmpty()) // no token, no love.
return NS_ERROR_FAILURE;
@ -874,7 +875,7 @@ nsMultiMixedConv::SendData(char *aBuffer, uint32_t aLen) {
return NS_OK;
}
uint32_t offset = mTotalSent;
uint64_t offset = mTotalSent;
mTotalSent += aLen;
nsCOMPtr<nsIStringInputStream> ss(

View File

@ -43,7 +43,7 @@ public:
void SetIsLastPart() { mIsLastPart = true; }
nsresult SendOnStartRequest(nsISupports* aContext);
nsresult SendOnDataAvailable(nsISupports* aContext, nsIInputStream* aStream,
uint32_t aOffset, uint32_t aLen);
uint64_t aOffset, uint32_t aLen);
nsresult SendOnStopRequest(nsISupports* aContext, nsresult aStatus);
/* SetContentDisposition expects the full value of the Content-Disposition
* header */

View File

@ -127,7 +127,7 @@ nsTXTToHTMLConv::PreFormatHTML(bool value)
NS_IMETHODIMP
nsTXTToHTMLConv::OnDataAvailable(nsIRequest* request, nsISupports *aContext,
nsIInputStream *aInStream,
uint32_t aOffset, uint32_t aCount)
uint64_t aOffset, uint32_t aCount)
{
nsresult rv = NS_OK;
nsString pushBuffer;

View File

@ -110,7 +110,7 @@ NS_IMETHODIMP
nsUnknownDecoder::OnDataAvailable(nsIRequest* request,
nsISupports *aCtxt,
nsIInputStream *aStream,
uint32_t aSourceOffset,
uint64_t aSourceOffset,
uint32_t aCount)
{
nsresult rv = NS_OK;

View File

@ -90,7 +90,7 @@ NS_IMETHODIMP
TestConverter::OnDataAvailable(nsIRequest* request,
nsISupports *ctxt,
nsIInputStream *inStr,
uint32_t sourceOffset,
uint64_t sourceOffset,
uint32_t count) {
nsresult rv;
nsCOMPtr<nsIInputStream> convertedStream;
@ -106,7 +106,7 @@ TestConverter::OnDataAvailable(nsIRequest* request,
uint64_t offset = sourceOffset;
while (len > 0) {
uint32_t count = saturated(len);
rv = mListener->OnDataAvailable(request, ctxt, convertedStream, saturated(offset), count);
rv = mListener->OnDataAvailable(request, ctxt, convertedStream, offset, count);
if (NS_FAILED(rv)) return rv;
offset += count;

View File

@ -59,7 +59,7 @@ public:
// nsIStreamListener method
NS_IMETHOD OnDataAvailable(nsIRequest* request, nsISupports *ctxt, nsIInputStream *inStr,
uint32_t sourceOffset, uint32_t count)
uint64_t sourceOffset, uint32_t count)
{
nsresult rv;
uint32_t read;
@ -120,7 +120,7 @@ nsresult SendData(const char * aData, nsIStreamListener* aListener, nsIRequest*
while (avail > 0) {
uint32_t count = saturated(avail);
rv = aListener->OnDataAvailable(request, nullptr, dataStream,
saturated(offset), count);
offset, count);
if (NS_FAILED(rv)) return rv;
offset += count;

View File

@ -129,7 +129,7 @@ Consumer::OnStopRequest(nsIRequest *request, nsISupports *aContext,
NS_IMETHODIMP
Consumer::OnDataAvailable(nsIRequest *request, nsISupports *aContext,
nsIInputStream *aIStream,
uint32_t aOffset, uint32_t aLength) {
uint64_t aOffset, uint32_t aLength) {
fprintf(stderr, "Consumer::OnData() -> in\n\n");
if (!mOnStart) {

View File

@ -55,7 +55,7 @@ MyListener::OnStopRequest(nsIRequest *req, nsISupports *ctxt, nsresult status)
NS_IMETHODIMP
MyListener::OnDataAvailable(nsIRequest *req, nsISupports *ctxt,
nsIInputStream *stream,
uint32_t offset, uint32_t count)
uint64_t offset, uint32_t count)
{
printf(">>> OnDataAvailable [count=%u]\n", count);

View File

@ -93,9 +93,9 @@ TestListener::OnStopRequest(nsIRequest *req, nsISupports *ctx, nsresult status)
NS_IMETHODIMP
TestListener::OnDataAvailable(nsIRequest *req, nsISupports *ctx,
nsIInputStream *is,
uint32_t offset, uint32_t count)
uint64_t offset, uint32_t count)
{
printf("OnDataAvailable: offset=%u count=%u\n", offset, count);
printf("OnDataAvailable: offset=%llu count=%u\n", offset, count);
if (!mFile) return NS_ERROR_FAILURE;

View File

@ -74,10 +74,10 @@ NS_IMETHODIMP
TestListener::OnDataAvailable(nsIRequest* request,
nsISupports* context,
nsIInputStream *aIStream,
uint32_t aSourceOffset,
uint64_t aSourceOffset,
uint32_t aLength)
{
LOG(("TestListener::OnDataAvailable [offset=%u length=%u]\n",
LOG(("TestListener::OnDataAvailable [offset=%llu length=%u]\n",
aSourceOffset, aLength));
char buf[1025];
uint32_t amt;

View File

@ -161,7 +161,7 @@ MyListener::OnStopRequest(nsIRequest *req, nsISupports *ctxt, nsresult status)
NS_IMETHODIMP
MyListener::OnDataAvailable(nsIRequest *req, nsISupports *ctxt,
nsIInputStream *stream,
uint32_t offset, uint32_t count)
uint64_t offset, uint32_t count)
{
//printf(">>> OnDataAvailable [count=%u]\n", count);
nsresult rv = NS_ERROR_FAILURE;
@ -170,7 +170,7 @@ MyListener::OnDataAvailable(nsIRequest *req, nsISupports *ctxt,
if(ctxt == nullptr) {
bytesRead=0;
rv = stream->ReadSegments(streamParse, &offset, count, &bytesRead);
rv = stream->ReadSegments(streamParse, nullptr, count, &bytesRead);
} else {
while (count) {
uint32_t amount = NS_MIN<uint32_t>(count, sizeof(buf));

View File

@ -77,7 +77,7 @@ MyListener::OnStartRequest(nsIRequest *req, nsISupports *ctx)
NS_IMETHODIMP
MyListener::OnDataAvailable(nsIRequest *req, nsISupports *ctx,
nsIInputStream *stream,
uint32_t offset, uint32_t count)
uint64_t offset, uint32_t count)
{
nsresult rv;
char buf[4096];

View File

@ -481,7 +481,7 @@ NS_IMETHODIMP
InputTestConsumer::OnDataAvailable(nsIRequest *request,
nsISupports* context,
nsIInputStream *aIStream,
uint32_t aSourceOffset,
uint64_t aSourceOffset,
uint32_t aLength)
{
char buf[1025];

View File

@ -150,7 +150,7 @@ public:
NS_IMETHOD OnDataAvailable(nsIRequest *request, nsISupports *ctxt,
nsIInputStream *inStr,
uint32_t sourceOffset, uint32_t count) {
uint64_t sourceOffset, uint32_t count) {
nsresult rv;
char buf[1024];
while (count > 0) {

View File

@ -38,16 +38,8 @@ public:
NS_DECL_ISUPPORTS
// IStreamListener interface...
NS_IMETHOD OnStartRequest(nsIRequest *request, nsISupports* context);
NS_IMETHOD OnDataAvailable(nsIRequest *request, nsISupports* context,
nsIInputStream *aIStream,
uint32_t aSourceOffset,
uint32_t aLength);
NS_IMETHOD OnStopRequest(nsIRequest *request, nsISupports* context,
nsresult aStatus);
NS_DECL_NSIREQUESTOBSERVER
NS_DECL_NSISTREAMLISTENER
};
@ -75,7 +67,7 @@ NS_IMETHODIMP
InputTestConsumer::OnDataAvailable(nsIRequest *request,
nsISupports* context,
nsIInputStream *aIStream,
uint32_t aSourceOffset,
uint64_t aSourceOffset,
uint32_t aLength)
{
char buf[1025];

View File

@ -54,9 +54,9 @@ public:
NS_IMETHOD OnDataAvailable(nsIRequest *req, nsISupports *ctx,
nsIInputStream *stream,
uint32_t offset, uint32_t count)
uint64_t offset, uint32_t count)
{
LOG(("MyListener::OnDataAvailable [offset=%u count=%u]\n", offset, count));
LOG(("MyListener::OnDataAvailable [offset=%llu count=%u]\n", offset, count));
char buf[500];
nsresult rv;

View File

@ -128,7 +128,7 @@ NS_IMETHODIMP
TestListener::OnDataAvailable( nsIChannel *aChannel,
nsISupports *aContext,
nsIInputStream *aStream,
uint32_t offset,
uint64_t offset,
uint32_t aLength ) {
nsresult rv = NS_OK;

View File

@ -65,7 +65,7 @@ NS_IMETHODIMP
InputTestConsumer::OnDataAvailable(nsIRequest *request,
nsISupports* context,
nsIInputStream *aIStream,
uint32_t aSourceOffset,
uint64_t aSourceOffset,
uint32_t aLength)
{
char buf[1025];

View File

@ -1122,7 +1122,7 @@ nsresult
nsHtml5StreamParser::OnDataAvailable(nsIRequest* aRequest,
nsISupports* aContext,
nsIInputStream* aInStream,
uint32_t aSourceOffset,
uint64_t aSourceOffset,
uint32_t aLength)
{
nsresult rv;

View File

@ -2061,7 +2061,7 @@ ParserWriteFunc(nsIInputStream* in,
nsresult
nsParser::OnDataAvailable(nsIRequest *request, nsISupports* aContext,
nsIInputStream *pIStream, uint32_t sourceOffset,
nsIInputStream *pIStream, uint64_t sourceOffset,
uint32_t aLength)
{
NS_PRECONDITION((eOnStart == mParserContext->mStreamListenerState ||

View File

@ -521,7 +521,7 @@ nsSAXXMLReader::ParseFromStream(nsIInputStream *aStream,
rv = mListener->OnDataAvailable(parserChannel, nullptr,
aStream,
(uint32_t)NS_MIN(offset, (uint64_t)PR_UINT32_MAX),
offset,
(uint32_t)available);
if (NS_SUCCEEDED(rv))
offset += available;
@ -576,7 +576,7 @@ nsSAXXMLReader::OnStopRequest(nsIRequest *aRequest, nsISupports *aContext,
NS_IMETHODIMP
nsSAXXMLReader::OnDataAvailable(nsIRequest *aRequest, nsISupports *aContext,
nsIInputStream *aInputStream, uint32_t offset,
nsIInputStream *aInputStream, uint64_t offset,
uint32_t count)
{
NS_ENSURE_TRUE(mIsAsyncParse, NS_ERROR_FAILURE);

View File

@ -536,7 +536,7 @@ RDFXMLDataSourceImpl::BlockingParse(nsIURI* aURL, nsIStreamListener* aConsumer)
if (avail > PR_UINT32_MAX)
avail = PR_UINT32_MAX;
rv = aConsumer->OnDataAvailable(channel, nullptr, bufStream, (uint32_t)NS_MIN(offset, (uint64_t)PR_UINT32_MAX), (uint32_t)avail);
rv = aConsumer->OnDataAvailable(channel, nullptr, bufStream, offset, (uint32_t)avail);
if (NS_SUCCEEDED(rv))
offset += avail;
}
@ -1143,7 +1143,7 @@ NS_IMETHODIMP
RDFXMLDataSourceImpl::OnDataAvailable(nsIRequest *request,
nsISupports *ctxt,
nsIInputStream *inStr,
uint32_t sourceOffset,
uint64_t sourceOffset,
uint32_t count)
{
return mListener->OnDataAvailable(request, ctxt, inStr, sourceOffset, count);

View File

@ -3183,7 +3183,7 @@ NS_IMETHODIMP
PSMContentDownloader::OnDataAvailable(nsIRequest* request,
nsISupports* context,
nsIInputStream *aIStream,
uint32_t aSourceOffset,
uint64_t aSourceOffset,
uint32_t aLength)
{
if (!mByteData)

View File

@ -613,7 +613,7 @@ NS_IMETHODIMP
AsyncFetchAndSetIconFromNetwork::OnDataAvailable(nsIRequest* aRequest,
nsISupports* aContext,
nsIInputStream* aInputStream,
uint32_t aOffset,
uint64_t aOffset,
uint32_t aCount)
{
nsAutoCString buffer;

View File

@ -448,7 +448,7 @@ NS_IMETHODIMP
nsUrlClassifierStreamUpdater::OnDataAvailable(nsIRequest *request,
nsISupports* context,
nsIInputStream *aIStream,
uint32_t aSourceOffset,
uint64_t aSourceOffset,
uint32_t aLength)
{
if (!mDBService)

View File

@ -277,8 +277,10 @@ NS_IMETHODIMP nsDocumentOpenInfo::OnStartRequest(nsIRequest *request, nsISupport
return rv;
}
NS_IMETHODIMP nsDocumentOpenInfo::OnDataAvailable(nsIRequest *request, nsISupports * aCtxt,
nsIInputStream * inStr, uint32_t sourceOffset, uint32_t count)
NS_IMETHODIMP
nsDocumentOpenInfo::OnDataAvailable(nsIRequest *request, nsISupports * aCtxt,
nsIInputStream * inStr,
uint64_t sourceOffset, uint32_t count)
{
TIME_URILOADER_FUNCTION(request);

View File

@ -33,7 +33,7 @@ NS_IMETHODIMP
ExternalHelperAppChild::OnDataAvailable(nsIRequest *request,
nsISupports *ctx,
nsIInputStream *input,
uint32_t offset,
uint64_t offset,
uint32_t count)
{
if (NS_FAILED(mStatus))

View File

@ -76,7 +76,7 @@ ExternalHelperAppParent::RecvOnStartRequest(const nsCString& entityID)
bool
ExternalHelperAppParent::RecvOnDataAvailable(const nsCString& data,
const uint32_t& offset,
const uint64_t& offset,
const uint32_t& count)
{
if (NS_FAILED(mStatus))

View File

@ -40,7 +40,7 @@ public:
NS_DECL_NSIRESUMABLECHANNEL
bool RecvOnStartRequest(const nsCString& entityID);
bool RecvOnDataAvailable(const nsCString& data, const uint32_t& offset, const uint32_t& count);
bool RecvOnDataAvailable(const nsCString& data, const uint64_t& offset, const uint32_t& count);
bool RecvOnStopRequest(const nsresult& code);
ExternalHelperAppParent(const OptionalURIParams& uri, const int64_t& contentLength);
@ -65,4 +65,4 @@ private:
};
} // namespace dom
} // namespace mozilla
} // namespace mozilla

View File

@ -13,7 +13,7 @@ protocol PExternalHelperApp
parent:
OnStartRequest(nsCString entityID);
OnDataAvailable(nsCString data, uint32_t offset, uint32_t count);
OnDataAvailable(nsCString data, uint64_t offset, uint32_t count);
OnStopRequest(nsresult code);
child:

View File

@ -1743,8 +1743,10 @@ void nsExternalAppHandler::SendStatusChange(ErrorType type, nsresult rv, nsIRequ
}
}
NS_IMETHODIMP nsExternalAppHandler::OnDataAvailable(nsIRequest *request, nsISupports * aCtxt,
nsIInputStream * inStr, uint32_t sourceOffset, uint32_t count)
NS_IMETHODIMP
nsExternalAppHandler::OnDataAvailable(nsIRequest *request, nsISupports * aCtxt,
nsIInputStream * inStr,
uint64_t sourceOffset, uint32_t count)
{
nsresult rv = NS_OK;
// first, check to see if we've been canceled....

Some files were not shown because too many files have changed in this diff Show More