mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Fixes (partially) #26488 and apply the https://github.com/servo/servo/pull/37324#discussion_r2133989190 comment. Testing: No tests added Fixes: Partially #26488 --------- Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com>
This commit is contained in:
parent
f451dccd0b
commit
b8738074d1
4 changed files with 62 additions and 25 deletions
|
@ -73,6 +73,9 @@ impl PromiseHelper for Rc<Promise> {
|
|||
}
|
||||
}
|
||||
|
||||
// Promise objects are stored inside Rc values, so Drop is run when the last Rc is dropped,
|
||||
// rather than when SpiderMonkey runs a GC. This makes it safe to interact with the JS engine unlike
|
||||
// Drop implementations for other DOM types.
|
||||
impl Drop for Promise {
|
||||
#[allow(unsafe_code)]
|
||||
fn drop(&mut self) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue