mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Introduce GlobalScope::time_profiler_chan
This commit is contained in:
parent
bfa7d045d0
commit
ae3763e7b3
5 changed files with 23 additions and 33 deletions
|
@ -89,14 +89,6 @@ impl<'a> GlobalRef<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
/// Get a `time::ProfilerChan` to send messages to the time profiler thread.
|
||||
pub fn time_profiler_chan(&self) -> &time::ProfilerChan {
|
||||
match *self {
|
||||
GlobalRef::Window(window) => window.time_profiler_chan(),
|
||||
GlobalRef::Worker(worker) => worker.time_profiler_chan(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Get a `IpcSender` to send messages to the constellation when available.
|
||||
pub fn constellation_chan(&self) -> &IpcSender<ConstellationMsg> {
|
||||
match *self {
|
||||
|
@ -214,7 +206,7 @@ impl<'a> GlobalRef<'a> {
|
|||
time::profile(
|
||||
time::ProfilerCategory::ScriptEvaluate,
|
||||
Some(metadata),
|
||||
self.time_profiler_chan().clone(),
|
||||
self.as_global_scope().time_profiler_chan().clone(),
|
||||
|| {
|
||||
let cx = self.get_cx();
|
||||
let globalhandle = self.reflector().get_jsobject();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue