aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/serviceworker.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/serviceworker.rs')
-rw-r--r--components/script/dom/serviceworker.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/components/script/dom/serviceworker.rs b/components/script/dom/serviceworker.rs
index cce149b5368..6f2dce2f8e0 100644
--- a/components/script/dom/serviceworker.rs
+++ b/components/script/dom/serviceworker.rs
@@ -89,8 +89,11 @@ impl ServiceWorkerMethods for ServiceWorker {
// Step 7
let data = try!(StructuredCloneData::write(cx, message));
let msg_vec = DOMMessage(data.move_to_arraybuffer());
- let _ = self.global().r().constellation_chan().send(ScriptMsg::ForwardDOMMessage(msg_vec,
- self.scope_url.clone()));
+ let _ =
+ self.global().r()
+ .as_global_scope()
+ .constellation_chan()
+ .send(ScriptMsg::ForwardDOMMessage(msg_vec, self.scope_url.clone()));
Ok(())
}