mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Add timeline markers for HTTP requests, JS evaluation, and HTML parsing.
This commit is contained in:
parent
36df00ae96
commit
9e8cf19e51
19 changed files with 126 additions and 30 deletions
|
@ -20,7 +20,7 @@ use js::jsapi::{JSContext, JSObject, JS_GetClass, MutableHandleValue};
|
|||
use js::{JSCLASS_IS_DOMJSCLASS, JSCLASS_IS_GLOBAL};
|
||||
use msg::constellation_msg::{ConstellationChan, PipelineId};
|
||||
use net_traits::ResourceThread;
|
||||
use profile_traits::mem;
|
||||
use profile_traits::{mem, time};
|
||||
use script_runtime::{CommonScriptMsg, ScriptChan, ScriptPort};
|
||||
use script_thread::{MainThreadScriptChan, ScriptThread};
|
||||
use script_traits::{MsDuration, ScriptMsg as ConstellationMsg, TimerEventRequest};
|
||||
|
@ -81,6 +81,14 @@ 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 `ConstellationChan` to send messages to the constellation channel when available.
|
||||
pub fn constellation_chan(&self) -> &ConstellationChan<ConstellationMsg> {
|
||||
match *self {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue