mirror of
https://github.com/servo/servo
synced 2026-04-26 01:25:32 +02:00
script: propagate VirtualMethods::unbind_from_tree with &mut JSContext (#44422)
Propagate `&mut JSContext` in `VirtualMethods::unbind_from_tree` Testing: Successful build is enough Fixes: #42837 --------- Signed-off-by: Emmanuel Paul Elom <elomemmanuel007@gmail.com>
This commit is contained in:
@@ -2131,15 +2131,9 @@ impl VirtualMethods for HTMLImageElement {
|
||||
}
|
||||
}
|
||||
|
||||
#[expect(unsafe_code)]
|
||||
/// <https://html.spec.whatwg.org/multipage/#the-img-element:html-element-removing-steps>
|
||||
fn unbind_from_tree(&self, context: &UnbindContext, _can_gc: CanGc) {
|
||||
// TODO: https://github.com/servo/servo/issues/42837
|
||||
let mut cx = unsafe { temp_cx() };
|
||||
let cx = &mut cx;
|
||||
self.super_type()
|
||||
.unwrap()
|
||||
.unbind_from_tree(context, CanGc::from_cx(cx));
|
||||
fn unbind_from_tree(&self, cx: &mut js::context::JSContext, context: &UnbindContext) {
|
||||
self.super_type().unwrap().unbind_from_tree(cx, context);
|
||||
let document = self.owner_document();
|
||||
document.unregister_responsive_image(self);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user