void FileSystemTaskBase::SetRequestResult(const FileSystemResponseValue& aValue) { MOZ_ASSERT(!FileSystemUtils::IsParentProcess(), "Only call from child process!"); MOZ_ASSERT(NS_IsMainThread(), "Only call on main thread!"); if (aValue.type() == FileSystemResponseValue::TFileSystemErrorResponse) { FileSystemErrorResponse r = aValue; mErrorValue = r.error(); } else { SetSuccessRequestResult(aValue); } }
void FileSystemTaskChildBase::SetRequestResult(const FileSystemResponseValue& aValue) { mFileSystem->AssertIsOnOwningThread(); if (aValue.type() == FileSystemResponseValue::TFileSystemErrorResponse) { FileSystemErrorResponse r = aValue; mErrorValue = r.error(); } else { ErrorResult rv; SetSuccessRequestResult(aValue, rv); mErrorValue = rv.StealNSResult(); } }