Fix GC borrow hazard in HTMLImageElement::finish_reacting_to_environment_change (#33904)

* Fix GC borrow hazard in HTMLImageElement::finish_reacting_to_environment_change

Signed-off-by: L Ashwin B <lashwinib@gmail.com>

* Fixed clippy error

Signed-off-by: L Ashwin B <lashwinib@gmail.com>

---------

Signed-off-by: L Ashwin B <lashwinib@gmail.com>
This commit is contained in:
chickenleaf 2024-10-20 02:33:03 +05:30 committed by GitHub
parent 2af81fb097
commit c242822eeb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1271,8 +1271,8 @@ impl HTMLImageElement {
// Step 15.5 // Step 15.5
mem::swap(&mut this.current_request.borrow_mut(), &mut pending_request); mem::swap(&mut this.current_request.borrow_mut(), &mut pending_request);
this.abort_request(State::Unavailable, ImageRequestPhase::Pending, CanGc::note());
} }
this.abort_request(State::Unavailable, ImageRequestPhase::Pending, CanGc::note());
// Step 15.6 // Step 15.6
this.upcast::<Node>().dirty(NodeDamage::OtherNodeDamage); this.upcast::<Node>().dirty(NodeDamage::OtherNodeDamage);