aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/filereader.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/filereader.rs')
-rw-r--r--components/script/dom/filereader.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/filereader.rs b/components/script/dom/filereader.rs
index 3ae20361ab6..a659908f31c 100644
--- a/components/script/dom/filereader.rs
+++ b/components/script/dom/filereader.rs
@@ -116,7 +116,7 @@ impl FileReader {
let global = fr.global.root();
let exception = DOMException::new(global.r(), error);
- fr.error.set(Some(JS::from_rooted(&exception)));
+ fr.error.set(Some(&exception));
fr.dispatch_progress_event("error".to_owned(), 0, None);
return_on_abort!();
@@ -292,7 +292,7 @@ impl FileReaderMethods for FileReader {
let global = self.global.root();
let exception = DOMException::new(global.r(), DOMErrorName::AbortError);
- self.error.set(Some(JS::from_rooted(&exception)));
+ self.error.set(Some(&exception));
self.terminate_ongoing_reading();
// Steps 5 & 6
@@ -346,7 +346,7 @@ impl FileReader {
if blob.IsClosed() {
let global = self.global.root();
let exception = DOMException::new(global.r(), DOMErrorName::InvalidStateError);
- self.error.set(Some(JS::from_rooted(&exception)));
+ self.error.set(Some(&exception));
self.dispatch_progress_event("error".to_owned(), 0, None);
return Ok(());