mirror of
https://github.com/servo/servo.git
synced 2025-09-23 05:10:09 +01:00
Port StorageThreadMsg to GenericChannel (#38932)
This change includes the following additions to GenericChannel: - Add a GenericSend trait which is meant to replace the `IpcSend` trait over time, as channels are migrated. For the time being this means, that we often need to use `GenericSend::send()` to disambiguate from the `IpcSend::send` function, until all usages of `IpcSend` have been replaced. - Add an OpaqueSender impl for GenericSender - Add a profiled version of GenericChannel. The profiling is 1:1 the same as for the existing profiled IPC channel, namely that only the blocked time during `recv` is measured. Testing: No functional changes, covered by existing tests Part of #38912 --------- Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This commit is contained in:
parent
c4dcd17214
commit
32aba08be7
12 changed files with 113 additions and 27 deletions
|
@ -14,6 +14,7 @@ mod font_context {
|
|||
use std::thread;
|
||||
|
||||
use app_units::Au;
|
||||
use base::generic_channel;
|
||||
use compositing_traits::CrossProcessCompositorApi;
|
||||
use fonts::platform::font::PlatformFont;
|
||||
use fonts::{
|
||||
|
@ -48,7 +49,7 @@ mod font_context {
|
|||
fn new() -> TestContext {
|
||||
let (system_font_service, system_font_service_proxy) = MockSystemFontService::spawn();
|
||||
let (core_sender, _) = ipc::channel().unwrap();
|
||||
let (storage_sender, _) = ipc::channel().unwrap();
|
||||
let (storage_sender, _) = generic_channel::channel().unwrap();
|
||||
let (indexeddb_sender, _) = ipc::channel().unwrap();
|
||||
let mock_resource_threads =
|
||||
ResourceThreads::new(core_sender, storage_sender, indexeddb_sender);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue