Auto merge of #15519 - gterzian:implement_structuredclone_callbacks, r=jdm

implement structured clone callbacks - support Blob cloning

<!-- Please describe your changes on the following line: -->
1. Implement stubs for structured clone callbacks.
2. Support Blob cloning.

Partial implementation of https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm

---
<!-- 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
- [ ] These changes fix #15021 (github issue number if applicable).

<!-- 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/15519)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-03-21 21:17:25 -07:00 committed by GitHub
commit 7be9f0e7c4
4 changed files with 212 additions and 7 deletions

View file

@ -163,6 +163,11 @@ impl Blob {
}
}
/// Get a copy of the type_string
pub fn get_type_string(&self) -> String {
self.type_string.clone()
}
/// Get a FileID representing the Blob content,
/// used by URL.createObjectURL
pub fn get_blob_url_id(&self) -> Uuid {