Fixes #4164 Make file.rs Constructor and new functions take GlobalRef by value

This commit is contained in:
Matt McCoy 2015-01-08 11:16:55 -05:00 committed by Matt McCoy
parent 85df7f0d6f
commit 5a54843111
2 changed files with 5 additions and 5 deletions

View file

@ -116,6 +116,6 @@ impl PrivateFormDataHelpers for FormData {
let global = self.global.root();
let f: Option<JSRef<File>> = FileCast::to_ref(value);
let name = filename.unwrap_or(f.map(|inner| inner.name().clone()).unwrap_or("blob".into_string()));
File::new(&global.r(), value, name)
File::new(global.r(), value, name)
}
}