mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Add a check for when the js execution stack is empty
This commit is contained in:
parent
87475b11d3
commit
43526c80bb
2 changed files with 10 additions and 1 deletions
|
@ -35,6 +35,12 @@ pub unsafe fn trace(tracer: *mut JSTracer) {
|
|||
})
|
||||
}
|
||||
|
||||
pub fn is_execution_stack_empty() -> bool {
|
||||
STACK.with(|stack| {
|
||||
stack.borrow().is_empty()
|
||||
})
|
||||
}
|
||||
|
||||
/// RAII struct that pushes and pops entries from the script settings stack.
|
||||
pub struct AutoEntryScript {
|
||||
global: DomRoot<GlobalScope>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue