bug #48546. SocketTransport now obeys the LOAD_BACKGROUND flag and will not call the nsIProgressEventSink.

This commit is contained in:
rpotts%netscape.com 2000-08-25 04:43:48 +00:00
Родитель c18b71c0f9
Коммит 70b257c35e
1 изменённых файлов: 7 добавлений и 3 удалений

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

@ -656,7 +656,10 @@ nsresult nsSocketTransport::Process(PRInt16 aSelectFlags)
break;
}
// Notify the nsIProgressEventSink of the progress...
if (!(nsIChannel::LOAD_BACKGROUND & mLoadAttributes)) {
fireStatus(mCurrentState);
}
//
// If the current state has successfully completed, then move to the
// next state for the current operation...
@ -1189,7 +1192,8 @@ nsresult nsSocketTransport::doRead(PRInt16 aSelectFlags)
("--- Leaving nsSocketTransport::doRead() [%s:%d %x]. rv = %x.\t"
"Total bytes read: %d\n\n",
mHostName, mPort, this, rv, totalBytesWritten));
if (mEventSink)
if (!(nsIChannel::LOAD_BACKGROUND & mLoadAttributes) && mEventSink)
// we don't have content length info at the socket level
// just pass 0 through.
(void)mEventSink->OnProgress(this, mReadContext, mReadOffset, 0);
@ -1284,7 +1288,7 @@ nsresult nsSocketTransport::doWrite(PRInt16 aSelectFlags)
"Total bytes written: %d\n\n",
mHostName, mPort, this, rv, totalBytesWritten));
if (mEventSink)
if (!(nsIChannel::LOAD_BACKGROUND & mLoadAttributes) && mEventSink)
// we don't have content length info at the socket level
// just pass 0 through.
(void)mEventSink->OnProgress(this, mWriteContext, mWriteOffset, 0);