mirror of
https://github.com/servo/servo.git
synced 2025-08-14 01:45:33 +01:00
store senders instead of buffering messages
This commit is contained in:
parent
0996b38ade
commit
9dcb7348a2
17 changed files with 193 additions and 188 deletions
|
@ -738,12 +738,6 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
|
|||
// store service worker manager for communicating with it.
|
||||
self.swmanager_chan = Some(sw_sender);
|
||||
}
|
||||
SWManagerMsg::ConnectServiceWorker(scope_url, pipeline_id, msg_chan) => {
|
||||
if let Some(ref parent_info) = self.pipelines.get(&pipeline_id) {
|
||||
let from_cons_msg = ConstellationControlMsg::ConnectServiceWorker(scope_url, msg_chan);
|
||||
let _ = parent_info.script_chan.send(from_cons_msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1006,6 +1000,13 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
|
|||
debug!("constellation got store registration scope message");
|
||||
self.handle_register_serviceworker(scope_things, scope);
|
||||
}
|
||||
FromScriptMsg::ForwardDOMMessage(msg_vec, scope_url) => {
|
||||
if let Some(ref mgr) = self.swmanager_chan {
|
||||
let _ = mgr.send(ServiceWorkerMsg::ForwardDOMMessage(msg_vec, scope_url));
|
||||
} else {
|
||||
warn!("Unable to forward DOMMessage for postMessage call");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue