mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Introduce GlobalScope::mem_profiler_chan
This commit is contained in:
parent
fe6fca9e1f
commit
bfa7d045d0
6 changed files with 24 additions and 32 deletions
|
@ -26,7 +26,7 @@ use js::rust::CompileOptionsWrapper;
|
|||
use libc;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use net_traits::{CoreResourceThread, IpcSend, ResourceThreads};
|
||||
use profile_traits::{mem, time};
|
||||
use profile_traits::time;
|
||||
use script_runtime::{CommonScriptMsg, EnqueuedPromiseCallback, ScriptChan};
|
||||
use script_runtime::{ScriptPort, maybe_take_panic_result};
|
||||
use script_thread::{MainThreadScriptChan, RunnableWrapper, ScriptThread};
|
||||
|
@ -89,14 +89,6 @@ impl<'a> GlobalRef<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
/// Get a `mem::ProfilerChan` to send messages to the memory profiler thread.
|
||||
pub fn mem_profiler_chan(&self) -> &mem::ProfilerChan {
|
||||
match *self {
|
||||
GlobalRef::Window(window) => window.mem_profiler_chan(),
|
||||
GlobalRef::Worker(worker) => worker.mem_profiler_chan(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Get a `time::ProfilerChan` to send messages to the time profiler thread.
|
||||
pub fn time_profiler_chan(&self) -> &time::ProfilerChan {
|
||||
match *self {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue