script: Propagate &mut JSContext inside evaluate_js_on_global (#42846)

Since `evaluate_js_on_global` called `enter_realm` and there were
already some callee that did it, I've actually passed `&mut
CurrentRealm`.
Also converted `Window::WebdriverException` to pass `&mut JSContext`
inside `javascript_error_info_from_error_info`.

Testing: A successful build is enough
Part of #40600

---------

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
This commit is contained in:
Gae24
2026-02-27 12:49:44 +01:00
committed by GitHub
parent 5c8e338c4e
commit 49b13627b5
11 changed files with 92 additions and 94 deletions

View File

@@ -193,11 +193,11 @@ impl HTMLIFrameElement {
let window_proxy = self.GetContentWindow();
if let Some(window_proxy) = window_proxy {
if !ScriptThread::navigate_to_javascript_url(
cx,
&document.global(),
&window_proxy.global(),
&mut load_data,
Some(self.upcast()),
CanGc::from_cx(cx),
) {
return;
}