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:
Josh Matthews 2025-08-30 15:47:26 -04:00 committed by GitHub
parent d3c5a8ec15
commit 0481477f35
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 9 additions and 37 deletions

View file

@ -111,7 +111,7 @@ use crate::dom::bindings::conversions::{
use crate::dom::bindings::inheritance::Castable;
use crate::dom::bindings::refcounted::Trusted;
use crate::dom::bindings::reflector::DomGlobal;
use crate::dom::bindings::root::{Dom, DomRoot, RootCollection, ThreadLocalStackRoots};
use crate::dom::bindings::root::{Dom, DomRoot};
use crate::dom::bindings::settings_stack::AutoEntryScript;
use crate::dom::bindings::str::DOMString;
use crate::dom::bindings::trace::{HashMapTracedValues, JSTraceable};
@ -415,8 +415,6 @@ impl ScriptThreadFactory for ScriptThread {
thread_state::initialize(ThreadState::SCRIPT | ThreadState::LAYOUT);
PipelineNamespace::install(state.pipeline_namespace_id);
WebViewId::install(state.webview_id);
let roots = RootCollection::new();
let _stack_roots = ThreadLocalStackRoots::new(&roots);
let memory_profiler_sender = state.memory_profiler_sender.clone();
let in_progress_load = InProgressLoad::new(