Bug 1826734 - Replace mozilla::Unused with (void) in dom/{file,filesystem} r=dom-storage-reviewers,asuth

Differential Revision: https://phabricator.services.mozilla.com/D174866
This commit is contained in:
Kagami Sascha Rosylight 2023-05-22 12:21:43 +00:00
Родитель dd92c6f6a6
Коммит 90f9330ffd
7 изменённых файлов: 19 добавлений и 20 удалений

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

@ -92,7 +92,7 @@ void FileReaderSync::ReadAsArrayBuffer(JSContext* aCx,
}
// arrayBuffer takes the ownership when it is not null. Otherwise we
// need to release it explicitly.
mozilla::Unused << bufferData.release();
(void)bufferData.release();
aRetval.set(arrayBuffer);
}

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

@ -304,7 +304,7 @@ MutableBlobStorage::~MutableBlobStorage() {
if (mFD) {
RefPtr<Runnable> runnable = new CloseFileRunnable(mFD);
Unused << DispatchToIOThread(runnable.forget());
(void)DispatchToIOThread(runnable.forget());
}
if (mTaskQueue) {
@ -349,7 +349,7 @@ void MutableBlobStorage::GetBlobImplWhenReady(
// If the dispatching fails, we are shutting down and it's fine to do not
// run the callback.
Unused << DispatchToIOThread(runnable.forget());
(void)DispatchToIOThread(runnable.forget());
return;
}
@ -542,7 +542,7 @@ void MutableBlobStorage::TemporaryFileCreated(PRFileDesc* aFD) {
// If this dispatching fails, CloseFileRunnable will close the FD in the
// DTOR on the current thread.
Unused << DispatchToIOThread(runnable.forget());
(void)DispatchToIOThread(runnable.forget());
// Let's inform the parent that we have nothing else to do.
mActor->SendOperationFailed();
@ -582,7 +582,7 @@ void MutableBlobStorage::TemporaryFileCreated(PRFileDesc* aFD) {
RefPtr<Runnable> runnable =
new LastRunnable(this, mPendingContentType, mPendingCallback);
Unused << DispatchToIOThread(runnable.forget());
(void)DispatchToIOThread(runnable.forget());
mPendingCallback = nullptr;
}
@ -606,7 +606,7 @@ void MutableBlobStorage::AskForBlob(TemporaryIPCBlobChildCallback* aCallback,
// mFD. The parent will take care of closing the duplicated file descriptor on
// its side.
RefPtr<Runnable> runnable = new CloseFileRunnable(mFD);
Unused << DispatchToIOThread(runnable.forget());
(void)DispatchToIOThread(runnable.forget());
mFD = nullptr;
mActor = nullptr;

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

@ -27,7 +27,7 @@ mozilla::ipc::IPCResult FileCreatorParent::CreateAndShareFile(
aLastModified.isSome() ? aLastModified.value() : 0,
aExistenceCheck, aIsFromNsIFile, getter_AddRefs(blobImpl));
if (NS_WARN_IF(NS_FAILED(rv))) {
Unused << Send__delete__(this, FileCreationErrorResult(rv));
(void)Send__delete__(this, FileCreationErrorResult(rv));
return IPC_OK();
}
@ -49,12 +49,11 @@ mozilla::ipc::IPCResult FileCreatorParent::CreateAndShareFile(
IPCBlob ipcBlob;
nsresult rv = dom::IPCBlobUtils::Serialize(blobImpl, ipcBlob);
if (NS_WARN_IF(NS_FAILED(rv))) {
Unused << Send__delete__(self, FileCreationErrorResult(rv));
(void)Send__delete__(self, FileCreationErrorResult(rv));
return;
}
Unused << Send__delete__(self,
FileCreationSuccessResult(ipcBlob));
(void)Send__delete__(self, FileCreationSuccessResult(ipcBlob));
}
}));
}));

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

@ -44,7 +44,7 @@ mozilla::ipc::IPCResult TemporaryIPCBlobParent::CreateAndShareFile() {
// must close the original (and clean up the NSPR descriptor).
PR_Close(fd);
Unused << SendFileDesc(fdd);
(void)SendFileDesc(fdd);
return IPC_OK();
}
@ -53,7 +53,7 @@ mozilla::ipc::IPCResult TemporaryIPCBlobParent::RecvOperationFailed() {
mActive = false;
// Nothing to do.
Unused << Send__delete__(this, NS_ERROR_FAILURE);
(void)Send__delete__(this, NS_ERROR_FAILURE);
return IPC_OK();
}
@ -79,11 +79,11 @@ mozilla::ipc::IPCResult TemporaryIPCBlobParent::RecvOperationDone(
IPCBlob ipcBlob;
nsresult rv = IPCBlobUtils::Serialize(blobImpl, ipcBlob);
if (NS_WARN_IF(NS_FAILED(rv))) {
Unused << Send__delete__(this, NS_ERROR_FAILURE);
(void)Send__delete__(this, NS_ERROR_FAILURE);
return IPC_OK();
}
Unused << Send__delete__(this, ipcBlob);
(void)Send__delete__(this, ipcBlob);
return IPC_OK();
}
@ -95,7 +95,7 @@ mozilla::ipc::IPCResult TemporaryIPCBlobParent::SendDeleteError(nsresult aRv) {
MOZ_ASSERT(mActive);
mActive = false;
Unused << Send__delete__(this, aRv);
(void)Send__delete__(this, aRv);
return IPC_OK();
}

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

@ -156,7 +156,7 @@ void BroadcastBlobURLRegistration(const nsACString& aURI,
}
dom::ContentChild* cc = dom::ContentChild::GetSingleton();
Unused << NS_WARN_IF(!cc->SendStoreAndBroadcastBlobURLRegistration(
(void)NS_WARN_IF(!cc->SendStoreAndBroadcastBlobURLRegistration(
nsCString(aURI), ipcBlob, aPrincipal, aAgentClusterId));
}
@ -171,7 +171,7 @@ void BroadcastBlobURLUnregistration(const nsCString& aURI,
dom::ContentChild* cc = dom::ContentChild::GetSingleton();
if (cc) {
Unused << NS_WARN_IF(
(void)NS_WARN_IF(
!cc->SendUnstoreAndBroadcastBlobURLUnregistration(aURI, aPrincipal));
}
}

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

@ -151,8 +151,8 @@ void FileSystemRequestParent::Start() {
nsAutoString path;
if (NS_WARN_IF(NS_FAILED(mTask->GetTargetPath(path)))) {
Unused << Send__delete__(
this, FileSystemErrorResponse(NS_ERROR_DOM_SECURITY_ERR));
(void)Send__delete__(this,
FileSystemErrorResponse(NS_ERROR_DOM_SECURITY_ERR));
return;
}

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

@ -190,7 +190,7 @@ void FileSystemTaskParentBase::HandleResult() {
}
MOZ_ASSERT(mRequestParent);
Unused << mRequestParent->Send__delete__(mRequestParent, GetRequestResult());
(void)mRequestParent->Send__delete__(mRequestParent, GetRequestResult());
}
FileSystemResponseValue FileSystemTaskParentBase::GetRequestResult() const {