mirror of
https://github.com/servo/servo
synced 2026-04-25 17:15:48 +02:00
script: Start using &mut JSContext in devtools and webdriver code (#42640)
This is a first step to compile scripts using `&mut JSContext`. Testing: Refactor, covered by existing WPT tests. Part of #40600 --------- Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
This commit is contained in:
@@ -1791,16 +1791,10 @@ impl WindowMethods<crate::DomTypeHolder> for Window {
|
||||
}
|
||||
}
|
||||
|
||||
fn WebdriverCallback(
|
||||
&self,
|
||||
cx: SafeJSContext,
|
||||
value: HandleValue,
|
||||
realm: InRealm,
|
||||
can_gc: CanGc,
|
||||
) {
|
||||
fn WebdriverCallback(&self, realm: &mut CurrentRealm, value: HandleValue) {
|
||||
let webdriver_script_sender = self.webdriver_script_chan.borrow_mut().take();
|
||||
if let Some(webdriver_script_sender) = webdriver_script_sender {
|
||||
let result = jsval_to_webdriver(cx, &self.globalscope, value, realm, can_gc);
|
||||
let result = jsval_to_webdriver(realm, &self.globalscope, value);
|
||||
let _ = webdriver_script_sender.send(result);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user