aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/file.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/file.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/file.rs')
-rw-r--r--components/script/dom/file.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/file.rs b/components/script/dom/file.rs
index bcea622d4d8..1bfd12a2654 100644
--- a/components/script/dom/file.rs
+++ b/components/script/dom/file.rs
@@ -8,7 +8,7 @@ use dom::bindings::codegen::UnionTypes::BlobOrString;
use dom::bindings::error::{Error, Fallible};
use dom::bindings::inheritance::Castable;
use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::Root;
+use dom::bindings::root::DomRoot;
use dom::bindings::str::DOMString;
use dom::blob::{Blob, BlobImpl, blob_parts_to_bytes};
use dom::globalscope::GlobalScope;
@@ -44,14 +44,14 @@ impl File {
#[allow(unrooted_must_root)]
pub fn new(global: &GlobalScope, blob_impl: BlobImpl,
- name: DOMString, modified: Option<i64>, typeString: &str) -> Root<File> {
+ name: DOMString, modified: Option<i64>, typeString: &str) -> DomRoot<File> {
reflect_dom_object(box File::new_inherited(blob_impl, name, modified, typeString),
global,
FileBinding::Wrap)
}
// Construct from selected file message from file manager thread
- pub fn new_from_selected(window: &Window, selected: SelectedFile) -> Root<File> {
+ pub fn new_from_selected(window: &Window, selected: SelectedFile) -> DomRoot<File> {
let name = DOMString::from(selected.filename.to_str().expect("File name encoding error"));
File::new(window.upcast(), BlobImpl::new_from_file(selected.id, selected.filename, selected.size),
@@ -63,7 +63,7 @@ impl File {
fileBits: Vec<BlobOrString>,
filename: DOMString,
filePropertyBag: &FileBinding::FilePropertyBag)
- -> Fallible<Root<File>> {
+ -> Fallible<DomRoot<File>> {
let bytes: Vec<u8> = match blob_parts_to_bytes(fileBits) {
Ok(bytes) => bytes,
Err(_) => return Err(Error::InvalidCharacter),