Introduce GlobalScope::constellation_chan

This commit is contained in:
Anthony Ramine 2016-10-01 04:15:47 +02:00
parent ae3763e7b3
commit f789e73fd2
14 changed files with 79 additions and 60 deletions

View file

@ -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(())
}