From f33e09d8f8d0814c75110328dd58ebf0815d34d9 Mon Sep 17 00:00:00 2001 From: Tetsuharu OHZEKI Date: Tue, 21 Oct 2014 01:47:10 +0900 Subject: [PATCH] Use DOMRefCell for FormData. --- components/script/dom/formdata.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/script/dom/formdata.rs b/components/script/dom/formdata.rs index cd6dbf65143..7642ebab0d4 100644 --- a/components/script/dom/formdata.rs +++ b/components/script/dom/formdata.rs @@ -2,6 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +use dom::bindings::cell::DOMRefCell; use dom::bindings::codegen::Bindings::FormDataBinding; use dom::bindings::codegen::Bindings::FormDataBinding::FormDataMethods; use dom::bindings::codegen::InheritTypes::FileCast; @@ -14,7 +15,6 @@ use dom::blob::Blob; use dom::file::File; use dom::htmlformelement::HTMLFormElement; use servo_util::str::DOMString; -use std::cell::RefCell; use std::collections::hashmap::HashMap; #[deriving(Clone)] @@ -27,7 +27,7 @@ pub enum FormDatum { #[dom_struct] pub struct FormData { - data: RefCell>>, + data: DOMRefCell>>, reflector_: Reflector, global: GlobalField, form: Option> @@ -36,7 +36,7 @@ pub struct FormData { impl FormData { fn new_inherited(form: Option>, global: &GlobalRef) -> FormData { FormData { - data: RefCell::new(HashMap::new()), + data: DOMRefCell::new(HashMap::new()), reflector_: Reflector::new(), global: GlobalField::from_rooted(global), form: form.map(|f| JS::from_rooted(f)),