refactor(resourcethread): expose constellationmsg channel

This commit is contained in:
OJ Kwon 2018-03-30 10:33:19 -07:00
parent d1378d6bad
commit 1c465bcd66
No known key found for this signature in database
GPG key ID: 6C23A45602A44DA6
5 changed files with 19 additions and 9 deletions

View file

@ -457,7 +457,7 @@ fn create_constellation(user_agent: Cow<'static, str>,
-> (Sender<ConstellationMsg>, SWManagerSenders) {
let bluetooth_thread: IpcSender<BluetoothRequest> = BluetoothThreadFactory::new(embedder_proxy.clone());
let (public_resource_threads, private_resource_threads) =
let (public_resource_threads, private_resource_threads, resource_constellation_sender) =
new_resource_threads(user_agent,
devtools_chan.clone(),
time_profiler_chan.clone(),
@ -533,6 +533,8 @@ fn create_constellation(user_agent: Cow<'static, str>,
webvr_constellation_sender.send(constellation_chan.clone()).unwrap();
}
resource_constellation_sender.send(constellation_chan.clone()).unwrap();
// channels to communicate with Service Worker Manager
let sw_senders = SWManagerSenders {
swmanager_sender: from_swmanager_sender,