Bug 1709138 - Fix a crash in MutableBlobStorage related to a wrong error propagation logic, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D236168
This commit is contained in:
@@ -339,8 +339,6 @@ void MutableBlobStorage::GetBlobImplWhenReady(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
MOZ_ASSERT(mActor);
|
|
||||||
|
|
||||||
// We want to wait until all the WriteRunnable are completed. The way we do
|
// We want to wait until all the WriteRunnable are completed. The way we do
|
||||||
// this is to go to the I/O thread and then we come back: the runnables are
|
// this is to go to the I/O thread and then we come back: the runnables are
|
||||||
// executed in order and this LastRunnable will be... the last one.
|
// executed in order and this LastRunnable will be... the last one.
|
||||||
@@ -594,9 +592,19 @@ void MutableBlobStorage::AskForBlob(TemporaryIPCBlobChildCallback* aCallback,
|
|||||||
|
|
||||||
MutexAutoLock lock(mMutex);
|
MutexAutoLock lock(mMutex);
|
||||||
MOZ_ASSERT(mStorageState == eClosed);
|
MOZ_ASSERT(mStorageState == eClosed);
|
||||||
|
MOZ_ASSERT(aCallback);
|
||||||
|
|
||||||
|
// If something went wrong in one of the previous WriteRunnable runnables,
|
||||||
|
// it's time to report the error.
|
||||||
|
if (NS_FAILED(mErrorResult)) {
|
||||||
|
MOZ_ASSERT(!mFD);
|
||||||
|
MOZ_ASSERT(!mActor);
|
||||||
|
aCallback->OperationFailed(mErrorResult);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
MOZ_ASSERT(mFD);
|
MOZ_ASSERT(mFD);
|
||||||
MOZ_ASSERT(mActor);
|
MOZ_ASSERT(mActor);
|
||||||
MOZ_ASSERT(aCallback);
|
|
||||||
|
|
||||||
// Let's pass the FileDescriptor to the parent actor in order to keep the file
|
// Let's pass the FileDescriptor to the parent actor in order to keep the file
|
||||||
// locked on windows.
|
// locked on windows.
|
||||||
|
|||||||
Reference in New Issue
Block a user