aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/blob.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2017-09-26 01:53:40 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2017-09-26 09:49:10 +0200
commitf87c2a8d7616112ca924e30292db2d244cf87eec (patch)
tree7344afe7ec0ec1ac7d1d13f5385111ee9c4be332 /components/script/dom/blob.rs
parent577370746e2ce3da7fa25a20b8e1bbeed319df65 (diff)
downloadservo-f87c2a8d7616112ca924e30292db2d244cf87eec.tar.gz
servo-f87c2a8d7616112ca924e30292db2d244cf87eec.zip
Rename Root<T> to DomRoot<T>
In a later PR, DomRoot<T> will become a type alias of Root<Dom<T>>, where Root<T> will be able to handle all the things that need to be rooted that have a stable traceable address that doesn't move for the whole lifetime of the root. Stay tuned.
Diffstat (limited to 'components/script/dom/blob.rs')
-rw-r--r--components/script/dom/blob.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/components/script/dom/blob.rs b/components/script/dom/blob.rs
index 7317f9f8d56..66dcc5b475c 100644
--- a/components/script/dom/blob.rs
+++ b/components/script/dom/blob.rs
@@ -8,7 +8,7 @@ use dom::bindings::codegen::Bindings::BlobBinding::BlobMethods;
use dom::bindings::codegen::UnionTypes::BlobOrString;
use dom::bindings::error::{Error, Fallible};
use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, Root};
+use dom::bindings::root::{Dom, DomRoot};
use dom::bindings::str::DOMString;
use dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
@@ -79,7 +79,7 @@ impl Blob {
#[allow(unrooted_must_root)]
pub fn new(
global: &GlobalScope, blob_impl: BlobImpl, typeString: String)
- -> Root<Blob> {
+ -> DomRoot<Blob> {
let boxed_blob = box Blob::new_inherited(blob_impl, typeString);
reflect_dom_object(boxed_blob, global, BlobBinding::Wrap)
}
@@ -97,7 +97,7 @@ impl Blob {
#[allow(unrooted_must_root)]
fn new_sliced(parent: &Blob, rel_pos: RelativePos,
- relative_content_type: DOMString) -> Root<Blob> {
+ relative_content_type: DOMString) -> DomRoot<Blob> {
let blob_impl = match *parent.blob_impl.borrow() {
BlobImpl::File(_) => {
// Create new parent node
@@ -120,7 +120,7 @@ impl Blob {
pub fn Constructor(global: &GlobalScope,
blobParts: Option<Vec<BlobOrString>>,
blobPropertyBag: &BlobBinding::BlobPropertyBag)
- -> Fallible<Root<Blob>> {
+ -> Fallible<DomRoot<Blob>> {
// TODO: accept other blobParts types - ArrayBuffer or ArrayBufferView
let bytes: Vec<u8> = match blobParts {
None => Vec::new(),
@@ -369,7 +369,7 @@ impl BlobMethods for Blob {
start: Option<i64>,
end: Option<i64>,
content_type: Option<DOMString>)
- -> Root<Blob> {
+ -> DomRoot<Blob> {
let rel_pos = RelativePos::from_opts(start, end);
Blob::new_sliced(self, rel_pos, content_type.unwrap_or(DOMString::from("")))
}