mirror of
https://github.com/servo/servo.git
synced 2025-09-23 05:10:09 +01:00
EmbedderMsg: port reply channels to GenericChannel (#39018)
This change ports all `EmbedderMsg` reply channels that don't use the `ROUTER` to GenericChannel. The remaining reply channels that use the router are blocked until #38973 is merged. This is a breaking change in the API between libservo and embedders. Future work: A lot of the reply channels in this PR look like they conceptually should be oneshot ipc channels. It might make sense to provide a `OneshotGenericChannel` abstraction that encodes this. Testing: No functional changes - covered by existing tests. None of the channels changed here uses the Router Part of #38912 --------- Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This commit is contained in:
parent
89e1357c75
commit
66d9f957e6
20 changed files with 107 additions and 95 deletions
|
@ -3347,13 +3347,10 @@ where
|
|||
response_sender,
|
||||
} = load_info;
|
||||
|
||||
let (webview_id_sender, webview_id_receiver) = match ipc::channel() {
|
||||
Ok(result) => result,
|
||||
Err(error) => {
|
||||
warn!("Failed to create channel: {error:?}");
|
||||
let _ = response_sender.send(None);
|
||||
return;
|
||||
},
|
||||
let Some((webview_id_sender, webview_id_receiver)) = generic_channel::channel() else {
|
||||
warn!("Failed to create channel");
|
||||
let _ = response_sender.send(None);
|
||||
return;
|
||||
};
|
||||
self.embedder_proxy.send(EmbedderMsg::AllowOpeningWebView(
|
||||
opener_webview_id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue