mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Reduce channel cloning.
This commit is contained in:
parent
207be7d2e2
commit
897be5f6ee
13 changed files with 38 additions and 38 deletions
|
@ -126,8 +126,8 @@ impl WorkerGlobalScope {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn mem_profiler_chan(&self) -> mem::ProfilerChan {
|
||||
self.mem_profiler_chan.clone()
|
||||
pub fn mem_profiler_chan(&self) -> &mem::ProfilerChan {
|
||||
&self.mem_profiler_chan
|
||||
}
|
||||
|
||||
pub fn devtools_chan(&self) -> Option<IpcSender<ScriptToDevtoolsControlMsg>> {
|
||||
|
@ -142,12 +142,12 @@ impl WorkerGlobalScope {
|
|||
&self.from_devtools_receiver
|
||||
}
|
||||
|
||||
pub fn constellation_chan(&self) -> ConstellationChan<ConstellationMsg> {
|
||||
self.constellation_chan.clone()
|
||||
pub fn constellation_chan(&self) -> &ConstellationChan<ConstellationMsg> {
|
||||
&self.constellation_chan
|
||||
}
|
||||
|
||||
pub fn scheduler_chan(&self) -> IpcSender<TimerEventRequest> {
|
||||
self.scheduler_chan.clone()
|
||||
pub fn scheduler_chan(&self) -> &IpcSender<TimerEventRequest> {
|
||||
&self.scheduler_chan
|
||||
}
|
||||
|
||||
pub fn schedule_callback(&self, callback: OneshotTimerCallback, duration: MsDuration) -> OneshotTimerHandle {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue