auto merge of #2649 : ebalint/servo/2580_JS_T_unrooted_replace, r=jdm

removed .clone() calls
modified from_rooted method parameter: T to &T
This commit is contained in:
bors-servo 2014-06-13 14:33:03 -04:00
commit 7ed5041891
20 changed files with 51 additions and 53 deletions

View file

@ -33,7 +33,7 @@ impl FormData {
FormData {
data: Traceable::new(RefCell::new(HashMap::new())),
reflector_: Reflector::new(),
window: window.unrooted(),
window: JS::from_rooted(window),
form: form.unrooted(),
}
}
@ -55,7 +55,7 @@ pub trait FormDataMethods {
impl<'a> FormDataMethods for JSRef<'a, FormData> {
fn Append(&self, name: DOMString, value: &JSRef<Blob>, filename: Option<DOMString>) {
let blob = BlobData {
blob: value.unrooted(),
blob: JS::from_rooted(value),
name: filename.unwrap_or("default".to_string())
};
self.data.deref().borrow_mut().insert(name.clone(), blob);