mirror of
https://github.com/servo/servo.git
synced 2025-09-29 16:19:14 +01:00
Move signals_slots to ScriptMutationObservers (#39275)
Both places where we access signals_slots already have a reference to ScriptMutationObserver. This saves us another access to with_script_thread. Testing: This does not change functionality. Fixes: Part of addressing: https://github.com/servo/servo/issues/37969 Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
This commit is contained in:
parent
250c4cda00
commit
033da09800
3 changed files with 21 additions and 32 deletions
|
@ -352,11 +352,11 @@ impl HTMLSlotElement {
|
|||
}
|
||||
self.is_in_agents_signal_slots.set(true);
|
||||
|
||||
let mutation_observers = ScriptThread::mutation_observers();
|
||||
// Step 1. Append slot to slot’s relevant agent’s signal slots.
|
||||
ScriptThread::add_signal_slot(self);
|
||||
mutation_observers.add_signal_slot(self);
|
||||
|
||||
// Step 2. Queue a mutation observer microtask.
|
||||
let mutation_observers = ScriptThread::mutation_observers();
|
||||
mutation_observers.queue_mutation_observer_microtask(ScriptThread::microtask_queue());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue