mirror of
https://github.com/servo/servo.git
synced 2025-09-30 08:39:16 +01:00
script: Reduce ScriptThread TLS usage (#38875)
We store a pointer to the ScriptThread singleton for a thread in thread-local storage. While we don't have yet have profiles pointing to this TLS access as a hot spot, we can remove a potential performance footgun without a lot of effort by passing around small pieces of data that we otherwise need to fetch from the ScriptThread. Testing: Existing WPT is sufficient Fixes: part of #37969 --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
d1da1a995c
commit
c97ec1b2fb
17 changed files with 129 additions and 68 deletions
|
@ -326,7 +326,7 @@ impl Node {
|
|||
|
||||
/// Implements the "unsafely set HTML" algorithm as specified in:
|
||||
/// <https://html.spec.whatwg.org/multipage/#concept-unsafely-set-html>
|
||||
pub fn unsafely_set_html(
|
||||
pub(crate) fn unsafely_set_html(
|
||||
target: &Node,
|
||||
context_element: &Element,
|
||||
html: DOMString,
|
||||
|
@ -2926,6 +2926,7 @@ impl Node {
|
|||
document.allow_declarative_shadow_roots(),
|
||||
Some(document.insecure_requests_policy()),
|
||||
document.has_trustworthy_ancestor_or_current_origin(),
|
||||
document.custom_element_reaction_stack(),
|
||||
can_gc,
|
||||
);
|
||||
DomRoot::upcast::<Node>(document)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue