mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Fix BorrowMutError crash in form reset (#36726)
Fixes: #36724 Signed-off-by: Taym <haddadi.taym@gmail.com>
This commit is contained in:
parent
e79520c25a
commit
b6a89ae408
3 changed files with 22 additions and 2 deletions
|
@ -1270,8 +1270,14 @@ impl HTMLFormElement {
|
|||
return;
|
||||
}
|
||||
|
||||
let controls = self.controls.borrow();
|
||||
for child in controls.iter() {
|
||||
let controls: Vec<_> = self
|
||||
.controls
|
||||
.borrow()
|
||||
.iter()
|
||||
.map(|c| c.as_rooted())
|
||||
.collect();
|
||||
|
||||
for child in controls {
|
||||
let child = child.upcast::<Node>();
|
||||
|
||||
match child.type_id() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue