aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/filereader.rs
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2015-11-02 14:21:11 -0800
committerEli Friedman <eli.friedman@gmail.com>2015-11-02 14:40:57 -0800
commitdf7fb8fa326e2b061e2da8c833cc558273db5f37 (patch)
tree538d53a61aaefbaa33f71dacb0b7d971b4eecbf2 /components/script/dom/filereader.rs
parentdb1163b1eceb5fef6463c4425e99d974a85a50a8 (diff)
downloadservo-df7fb8fa326e2b061e2da8c833cc558273db5f37.tar.gz
servo-df7fb8fa326e2b061e2da8c833cc558273db5f37.zip
Remove JSTraceable implementation from RefCell.
The implementation wasn't really right, and we would rather just use DOMRefCell anyway.
Diffstat (limited to 'components/script/dom/filereader.rs')
-rw-r--r--components/script/dom/filereader.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/components/script/dom/filereader.rs b/components/script/dom/filereader.rs
index dce7ef438dc..606debbc106 100644
--- a/components/script/dom/filereader.rs
+++ b/components/script/dom/filereader.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::BlobBinding::BlobMethods;
use dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull;
use dom::bindings::codegen::Bindings::FileReaderBinding::{self, FileReaderConstants, FileReaderMethods};
@@ -23,7 +24,7 @@ use hyper::mime::{Attr, Mime};
use rustc_serialize::base64::{CharacterSet, Config, Newline, ToBase64};
use script_task::ScriptTaskEventCategory::FileRead;
use script_task::{CommonScriptMsg, Runnable, ScriptChan, ScriptPort};
-use std::cell::{Cell, RefCell};
+use std::cell::Cell;
use std::sync::mpsc;
use std::sync::mpsc::Receiver;
use util::str::DOMString;
@@ -72,7 +73,7 @@ pub struct FileReader {
global: GlobalField,
ready_state: Cell<FileReaderReadyState>,
error: MutNullableHeap<JS<DOMException>>,
- result: RefCell<Option<DOMString>>,
+ result: DOMRefCell<Option<DOMString>>,
generation_id: Cell<GenerationId>,
}
@@ -83,7 +84,7 @@ impl FileReader {
global: GlobalField::from_rooted(&global),
ready_state: Cell::new(FileReaderReadyState::Empty),
error: MutNullableHeap::new(None),
- result: RefCell::new(None),
+ result: DOMRefCell::new(None),
generation_id: Cell::new(GenerationId(0)),
}
}