mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Reduce channel cloning.
This commit is contained in:
parent
207be7d2e2
commit
897be5f6ee
13 changed files with 38 additions and 38 deletions
|
@ -74,7 +74,7 @@ impl<'a> GlobalRef<'a> {
|
|||
}
|
||||
|
||||
/// Get a `mem::ProfilerChan` to send messages to the memory profiler thread.
|
||||
pub fn mem_profiler_chan(&self) -> mem::ProfilerChan {
|
||||
pub fn mem_profiler_chan(&self) -> &mem::ProfilerChan {
|
||||
match *self {
|
||||
GlobalRef::Window(window) => window.mem_profiler_chan(),
|
||||
GlobalRef::Worker(worker) => worker.mem_profiler_chan(),
|
||||
|
@ -82,7 +82,7 @@ impl<'a> GlobalRef<'a> {
|
|||
}
|
||||
|
||||
/// Get a `ConstellationChan` to send messages to the constellation channel when available.
|
||||
pub fn constellation_chan(&self) -> ConstellationChan<ConstellationMsg> {
|
||||
pub fn constellation_chan(&self) -> &ConstellationChan<ConstellationMsg> {
|
||||
match *self {
|
||||
GlobalRef::Window(window) => window.constellation_chan(),
|
||||
GlobalRef::Worker(worker) => worker.constellation_chan(),
|
||||
|
@ -90,7 +90,7 @@ impl<'a> GlobalRef<'a> {
|
|||
}
|
||||
|
||||
/// Get the scheduler channel to request timer events.
|
||||
pub fn scheduler_chan(&self) -> IpcSender<TimerEventRequest> {
|
||||
pub fn scheduler_chan(&self) -> &IpcSender<TimerEventRequest> {
|
||||
match *self {
|
||||
GlobalRef::Window(window) => window.scheduler_chan(),
|
||||
GlobalRef::Worker(worker) => worker.scheduler_chan(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue