Use mozjs tracing infrastructure (#29918)

* Update mozjs

64711ec2e6 also fixes https://github.com/servo/servo/issues/30043

* Move to mozjs Traceable and introduce CustomTraceable
This commit is contained in:
Samson 2023-08-10 23:46:06 +02:00 committed by GitHub
parent 1f7f4cf2be
commit 450f8193a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 81 additions and 377 deletions

View file

@ -521,8 +521,6 @@ impl<'a> Iterator for DocumentsIter<'a> {
pub struct IncompleteParserContexts(RefCell<Vec<(PipelineId, ParserContext)>>);
unsafe_no_jsmanaged_fields!(TaskQueue<MainThreadScriptMsg>);
unsafe_no_jsmanaged_fields!(dyn BackgroundHangMonitorRegister);
unsafe_no_jsmanaged_fields!(dyn BackgroundHangMonitor);
#[derive(JSTraceable)]
// ScriptThread instances are rooted on creation, so this is okay
@ -552,8 +550,10 @@ pub struct ScriptThread {
task_queue: TaskQueue<MainThreadScriptMsg>,
/// A handle to register associated layout threads for hang-monitoring.
#[no_trace]
background_hang_monitor_register: Box<dyn BackgroundHangMonitorRegister>,
/// The dedicated means of communication with the background-hang-monitor for this script-thread.
#[no_trace]
background_hang_monitor: Box<dyn BackgroundHangMonitor>,
/// A flag set to `true` by the BHM on exit, and checked from within the interrupt handler.
closing: Arc<AtomicBool>,