Bug 559927 - nsAsyncStreamCopier::mCopierCtx not consistently protected by ::mLock. r=cbiesi
This commit is contained in:
Родитель
5264479104
Коммит
ded0f10dcc
|
@ -283,9 +283,12 @@ nsAsyncStreamCopier::AsyncCopy(nsIRequestObserver *observer, nsISupports *ctx)
|
|||
// we want to receive progress notifications; release happens in
|
||||
// OnAsyncCopyComplete.
|
||||
NS_ADDREF_THIS();
|
||||
rv = NS_AsyncCopy(mSource, mSink, mTarget, mMode, mChunkSize,
|
||||
OnAsyncCopyComplete, this, mCloseSource, mCloseSink,
|
||||
getter_AddRefs(mCopierCtx));
|
||||
{
|
||||
nsAutoLock lock(mLock);
|
||||
rv = NS_AsyncCopy(mSource, mSink, mTarget, mMode, mChunkSize,
|
||||
OnAsyncCopyComplete, this, mCloseSource, mCloseSink,
|
||||
getter_AddRefs(mCopierCtx));
|
||||
}
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_RELEASE_THIS();
|
||||
Cancel(rv);
|
||||
|
|
Загрузка…
Ссылка в новой задаче