aboutsummaryrefslogtreecommitdiffstats
path: root/components/net_traits/filemanager_thread.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-07-11 00:13:45 -0700
committerGitHub <noreply@github.com>2016-07-11 00:13:45 -0700
commit42e90f7db9d5ee7c6176e35e600cd27fe9c6748c (patch)
tree6c7156fe3e563f03e8512692e0aed69163c227d5 /components/net_traits/filemanager_thread.rs
parent2239e827bd0ac4f23f9e15a2b2a79685b0f6d422 (diff)
parent0ff6f313e881279c75daa0d6c974e726ef2759f3 (diff)
downloadservo-42e90f7db9d5ee7c6176e35e600cd27fe9c6748c.tar.gz
servo-42e90f7db9d5ee7c6176e35e600cd27fe9c6748c.zip
Auto merge of #12378 - izgzhen:blob-url-revocation-fix, r=Manishearth
Add FileID validity setting/checking logic to Blob URL implementation r? @Manishearth --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12378) <!-- Reviewable:end -->
Diffstat (limited to 'components/net_traits/filemanager_thread.rs')
-rw-r--r--components/net_traits/filemanager_thread.rs18
1 files changed, 13 insertions, 5 deletions
diff --git a/components/net_traits/filemanager_thread.rs b/components/net_traits/filemanager_thread.rs
index 88f1b147302..6bbf8b59c9f 100644
--- a/components/net_traits/filemanager_thread.rs
+++ b/components/net_traits/filemanager_thread.rs
@@ -129,18 +129,26 @@ pub enum FileManagerThreadMsg {
/// Load resource by Blob URL
LoadBlob(LoadData, LoadConsumer),
- /// Add an entry and send back the associated uuid
- TransferMemory(BlobURLStoreEntry, IpcSender<Result<SelectedFileId, BlobURLStoreError>>, FileOrigin),
+ /// Add an entry as promoted memory-based blob and send back the associated FileID
+ /// as part of a valid Blob URL
+ PromoteMemory(BlobURLStoreEntry, IpcSender<Result<SelectedFileId, BlobURLStoreError>>, FileOrigin),
- /// Add a sliced entry pointing to the parent id with a relative slicing positing
- AddSlicedEntry(SelectedFileId, RelativePos, IpcSender<Result<SelectedFileId, BlobURLStoreError>>, FileOrigin),
+ /// Add a sliced entry pointing to the parent FileID, and send back the associated FileID
+ /// as part of a valid Blob URL
+ AddSlicedURLEntry(SelectedFileId, RelativePos, IpcSender<Result<SelectedFileId, BlobURLStoreError>>, FileOrigin),
- /// Decrease reference count
+ /// Revoke Blob URL and send back the acknowledgement
+ RevokeBlobURL(SelectedFileId, FileOrigin, IpcSender<Result<(), BlobURLStoreError>>),
+
+ /// Decrease reference count and send back the acknowledgement
DecRef(SelectedFileId, FileOrigin, IpcSender<Result<(), BlobURLStoreError>>),
/// Increase reference count
IncRef(SelectedFileId, FileOrigin),
+ /// Activate an internal FileID so it becomes valid as part of a Blob URL
+ ActivateBlobURL(SelectedFileId, IpcSender<Result<(), BlobURLStoreError>>, FileOrigin),
+
/// Shut down this thread
Exit,
}