Integration and improvements of File API backends

1. More complete origin check in FileManagerThreadMsg
2. Add reference counting logic to file manage store and script API
3. Integrate the support of slicing
This commit is contained in:
Zhen Zhang 2016-06-18 18:14:40 +08:00
parent 212aa4437e
commit 14d68968ed
14 changed files with 543 additions and 244 deletions

View file

@ -23,6 +23,7 @@ pub struct File {
}
impl File {
#[allow(unrooted_must_root)]
fn new_inherited(blob_impl: BlobImpl, name: DOMString,
modified: Option<i64>, typeString: &str) -> File {
File {
@ -39,6 +40,7 @@ impl File {
}
}
#[allow(unrooted_must_root)]
pub fn new(global: GlobalRef, blob_impl: BlobImpl,
name: DOMString, modified: Option<i64>, typeString: &str) -> Root<File> {
reflect_dom_object(box File::new_inherited(blob_impl, name, modified, typeString),