mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Introduce GlobalScope::constellation_chan
This commit is contained in:
parent
ae3763e7b3
commit
f789e73fd2
14 changed files with 79 additions and 60 deletions
|
@ -30,7 +30,7 @@ use profile_traits::time;
|
|||
use script_runtime::{CommonScriptMsg, EnqueuedPromiseCallback, ScriptChan};
|
||||
use script_runtime::{ScriptPort, maybe_take_panic_result};
|
||||
use script_thread::{MainThreadScriptChan, RunnableWrapper, ScriptThread};
|
||||
use script_traits::{MsDuration, ScriptMsg as ConstellationMsg, TimerEventRequest};
|
||||
use script_traits::{MsDuration, TimerEventRequest};
|
||||
use std::ffi::CString;
|
||||
use std::panic;
|
||||
use task_source::file_reading::FileReadingTaskSource;
|
||||
|
@ -89,14 +89,6 @@ impl<'a> GlobalRef<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
/// Get a `IpcSender` to send messages to the constellation when available.
|
||||
pub fn constellation_chan(&self) -> &IpcSender<ConstellationMsg> {
|
||||
match *self {
|
||||
GlobalRef::Window(window) => window.constellation_chan(),
|
||||
GlobalRef::Worker(worker) => worker.constellation_chan(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Get the scheduler channel to request timer events.
|
||||
pub fn scheduler_chan(&self) -> &IpcSender<TimerEventRequest> {
|
||||
match *self {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue