mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Issue #1820 - Improve the Blob implementation
This commit is contained in:
parent
bdb3a2538b
commit
f2885b8fc7
6 changed files with 125 additions and 22 deletions
|
@ -18,9 +18,9 @@ pub struct File {
|
|||
}
|
||||
|
||||
impl File {
|
||||
fn new_inherited(_file_bits: JSRef<Blob>, name: DOMString) -> File {
|
||||
fn new_inherited(global: &GlobalRef, _file_bits: JSRef<Blob>, name: DOMString) -> File {
|
||||
File {
|
||||
blob: Blob::new_inherited(),
|
||||
blob: Blob::new_inherited(global, None),
|
||||
name: name,
|
||||
type_: FileTypeId
|
||||
}
|
||||
|
@ -28,9 +28,9 @@ impl File {
|
|||
// the relevant subfields of file_bits should be copied over
|
||||
}
|
||||
|
||||
pub fn new(global: GlobalRef, file_bits: JSRef<Blob>, name: DOMString) -> Temporary<File> {
|
||||
reflect_dom_object(box File::new_inherited(file_bits, name),
|
||||
global,
|
||||
pub fn new(global: &GlobalRef, file_bits: JSRef<Blob>, name: DOMString) -> Temporary<File> {
|
||||
reflect_dom_object(box File::new_inherited(global, file_bits, name),
|
||||
*global,
|
||||
FileBinding::Wrap)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue