mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Make ScriptEvaluate count script execution in DOM events and timers (#34286)
Signed-off-by: Delan Azabani <dazabani@igalia.com>
This commit is contained in:
parent
4a06dc53f6
commit
26748621cd
3 changed files with 77 additions and 85 deletions
|
@ -42,6 +42,8 @@ pub fn is_execution_stack_empty() -> bool {
|
|||
/// RAII struct that pushes and pops entries from the script settings stack.
|
||||
pub struct AutoEntryScript {
|
||||
global: DomRoot<GlobalScope>,
|
||||
#[cfg(feature = "tracing")]
|
||||
span: tracing::span::EnteredSpan,
|
||||
}
|
||||
|
||||
impl AutoEntryScript {
|
||||
|
@ -56,6 +58,8 @@ impl AutoEntryScript {
|
|||
});
|
||||
AutoEntryScript {
|
||||
global: DomRoot::from_ref(global),
|
||||
#[cfg(feature = "tracing")]
|
||||
span: tracing::info_span!("ScriptEvaluate", servo_profiling = true).entered(),
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue