зеркало из https://github.com/mozilla/gecko-dev.git
bug #48546. SocketTransport now obeys the LOAD_BACKGROUND flag and will not call the nsIProgressEventSink.
This commit is contained in:
Родитель
c18b71c0f9
Коммит
70b257c35e
|
@ -656,7 +656,10 @@ nsresult nsSocketTransport::Process(PRInt16 aSelectFlags)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Notify the nsIProgressEventSink of the progress...
|
||||||
|
if (!(nsIChannel::LOAD_BACKGROUND & mLoadAttributes)) {
|
||||||
fireStatus(mCurrentState);
|
fireStatus(mCurrentState);
|
||||||
|
}
|
||||||
//
|
//
|
||||||
// If the current state has successfully completed, then move to the
|
// If the current state has successfully completed, then move to the
|
||||||
// next state for the current operation...
|
// next state for the current operation...
|
||||||
|
@ -1189,7 +1192,8 @@ nsresult nsSocketTransport::doRead(PRInt16 aSelectFlags)
|
||||||
("--- Leaving nsSocketTransport::doRead() [%s:%d %x]. rv = %x.\t"
|
("--- Leaving nsSocketTransport::doRead() [%s:%d %x]. rv = %x.\t"
|
||||||
"Total bytes read: %d\n\n",
|
"Total bytes read: %d\n\n",
|
||||||
mHostName, mPort, this, rv, totalBytesWritten));
|
mHostName, mPort, this, rv, totalBytesWritten));
|
||||||
if (mEventSink)
|
|
||||||
|
if (!(nsIChannel::LOAD_BACKGROUND & mLoadAttributes) && mEventSink)
|
||||||
// we don't have content length info at the socket level
|
// we don't have content length info at the socket level
|
||||||
// just pass 0 through.
|
// just pass 0 through.
|
||||||
(void)mEventSink->OnProgress(this, mReadContext, mReadOffset, 0);
|
(void)mEventSink->OnProgress(this, mReadContext, mReadOffset, 0);
|
||||||
|
@ -1284,7 +1288,7 @@ nsresult nsSocketTransport::doWrite(PRInt16 aSelectFlags)
|
||||||
"Total bytes written: %d\n\n",
|
"Total bytes written: %d\n\n",
|
||||||
mHostName, mPort, this, rv, totalBytesWritten));
|
mHostName, mPort, this, rv, totalBytesWritten));
|
||||||
|
|
||||||
if (mEventSink)
|
if (!(nsIChannel::LOAD_BACKGROUND & mLoadAttributes) && mEventSink)
|
||||||
// we don't have content length info at the socket level
|
// we don't have content length info at the socket level
|
||||||
// just pass 0 through.
|
// just pass 0 through.
|
||||||
(void)mEventSink->OnProgress(this, mWriteContext, mWriteOffset, 0);
|
(void)mEventSink->OnProgress(this, mWriteContext, mWriteOffset, 0);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче