mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Fix /custom-elements/when-defined-reentry-crash.html (#30121)
The problem is a double-borrow of the `when_defined` member. The fix is to let go of the borrow before resolving the promise which will eventually try to borrow `when_defined` again. Fixes #30120.
This commit is contained in:
parent
0fb2dc70ff
commit
218ad8f574
1 changed files with 2 additions and 1 deletions
|
@ -397,7 +397,8 @@ impl CustomElementRegistryMethods for CustomElementRegistry {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Step 16, 16.3
|
// Step 16, 16.3
|
||||||
if let Some(promise) = self.when_defined.borrow_mut().remove(&name) {
|
let promise = self.when_defined.borrow_mut().remove(&name);
|
||||||
|
if let Some(promise) = promise {
|
||||||
unsafe {
|
unsafe {
|
||||||
rooted!(in(*cx) let mut constructor = UndefinedValue());
|
rooted!(in(*cx) let mut constructor = UndefinedValue());
|
||||||
definition
|
definition
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue