script: Pass &mut JSContext to RoutedPromiseListener (#43943)

Part of #40600

Testing: It compiles

Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>
This commit is contained in:
Tim van der Lippe
2026-04-05 13:18:25 +02:00
committed by GitHub
parent 9da7484061
commit cf1b104b1a
9 changed files with 63 additions and 53 deletions

View File

@@ -159,11 +159,11 @@ impl GPUShaderModuleMethods<crate::DomTypeHolder> for GPUShaderModule {
impl RoutedPromiseListener<Option<ShaderCompilationInfo>> for GPUShaderModule {
fn handle_response(
&self,
cx: &mut js::context::JSContext,
response: Option<ShaderCompilationInfo>,
promise: &Rc<Promise>,
can_gc: CanGc,
) {
let info = GPUCompilationInfo::from(&self.global(), response, can_gc);
promise.resolve_native(&info, can_gc);
let info = GPUCompilationInfo::from(&self.global(), response, CanGc::from_cx(cx));
promise.resolve_native(&info, CanGc::from_cx(cx));
}
}