FileSystemResponseValue CreateFileTask::GetSuccessRequestResult() const { MOZ_ASSERT(NS_IsMainThread(), "Only call on main thread!"); BlobParent* actor = GetBlobParent(mTargetBlobImpl); if (!actor) { return FileSystemErrorResponse(NS_ERROR_DOM_FILESYSTEM_UNKNOWN_ERR); } FileSystemFileResponse response; response.blobParent() = actor; return response; }
FileSystemResponseValue GetFileOrDirectoryTask::GetSuccessRequestResult() const { MOZ_ASSERT(NS_IsMainThread(), "Only call on main thread!"); if (mIsDirectory) { return FileSystemDirectoryResponse(mTargetRealPath); } BlobParent* actor = GetBlobParent(mTargetFile); if (!actor) { return FileSystemErrorResponse(NS_ERROR_DOM_FILESYSTEM_UNKNOWN_ERR); } FileSystemFileResponse response; response.blobParent() = actor; return response; }
FileSystemResponseValue GetDirectoryListingTask::GetSuccessRequestResult() const { MOZ_ASSERT(NS_IsMainThread(), "Only call on main thread!"); InfallibleTArray<PBlobParent*> blobs; for (unsigned i = 0; i < mTargetBlobImpls.Length(); i++) { BlobParent* blobParent = GetBlobParent(mTargetBlobImpls[i]); if (blobParent) { blobs.AppendElement(blobParent); } } FileSystemDirectoryListingResponse response; response.blobsParent().SwapElements(blobs); return response; }