mirror of
https://github.com/servo/servo.git
synced 2025-09-30 16:49:16 +01:00
script_bindings: Remove Cell wrapper from thread-local RootCollection. (#39043)
This doesn't appear to make a big difference in speedometer results, but this removes some code from the hot path of creating DomRoot values. Before: `Score: 30.381097406624708 ± 2.0393225244958018` After: `Score: 30.344639420871395 ± 1.9359337921154696` Testing: Existing WPT coverage Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
d3c5a8ec15
commit
0481477f35
6 changed files with 9 additions and 37 deletions
|
@ -38,7 +38,7 @@ use crate::dom::bindings::error::Error;
|
|||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::refcounted::TrustedPromise;
|
||||
use crate::dom::bindings::reflector::{DomGlobal, Reflector, reflect_dom_object};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot, RootCollection, ThreadLocalStackRoots};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
use crate::dom::bindings::str::USVString;
|
||||
use crate::dom::bindings::trace::{CustomTraceable, JSTraceable, RootedTraceableBox};
|
||||
use crate::dom::csp::Violation;
|
||||
|
@ -495,8 +495,6 @@ impl WorkletThread {
|
|||
// TODO: configure the JS runtime (e.g. discourage GC, encourage agressive JIT)
|
||||
debug!("Initializing worklet thread.");
|
||||
thread_state::initialize(ThreadState::SCRIPT | ThreadState::IN_WORKER);
|
||||
let roots = RootCollection::new();
|
||||
let _stack_roots = ThreadLocalStackRoots::new(&roots);
|
||||
let mut thread = RootedTraceableBox::new(WorkletThread {
|
||||
role,
|
||||
control_receiver,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue