aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/worker.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/worker.rs')
-rw-r--r--components/script/dom/worker.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/worker.rs b/components/script/dom/worker.rs
index 833675fa1e3..9e590b0f7da 100644
--- a/components/script/dom/worker.rs
+++ b/components/script/dom/worker.rs
@@ -145,8 +145,8 @@ impl Worker {
#[allow(unsafe_code)]
fn dispatch_error(&self, error_info: ErrorInfo) {
- let global = self.global();
- let event = ErrorEvent::new(global.r().as_global_scope(),
+ let global = self.global_scope();
+ let event = ErrorEvent::new(&global,
atom!("error"),
EventBubbles::DoesNotBubble,
EventCancelable::Cancelable,
@@ -161,7 +161,7 @@ impl Worker {
return;
}
- global.r().report_an_error(error_info, unsafe { NullHandleValue });
+ global.report_an_error(error_info, unsafe { NullHandleValue });
}
}