Pass &mut JSContext (#43543)

This is follow-up of #41459.

We replace some of these:

```rust
let mut cx = unsafe { script_bindings::script_runtime::temp_cx() };
```

..by passing a `cx: &mut JSContext` instead.

---

Testing: existing WPT tests  
Fixes: #43453

Signed-off-by: pylbrecht <pylbrecht@mailbox.org>
This commit is contained in:
Philipp Albrecht
2026-03-22 21:58:05 +01:00
committed by GitHub
parent 1e514bcfe9
commit 2f1b7f0f84
2 changed files with 25 additions and 12 deletions

View File

@@ -962,12 +962,12 @@ impl HTMLScriptElement {
};
fetch_inline_module_script(
cx,
ModuleOwner::Window(Trusted::new(self)),
text_rc,
base_url,
options,
self.line_number as u32,
CanGc::from_cx(cx),
);
},
ScriptType::ImportMap => {