diff options
author | CYBAI <cyb.ai.815@gmail.com> | 2018-10-21 21:30:19 +0800 |
---|---|---|
committer | CYBAI <cyb.ai.815@gmail.com> | 2018-10-21 21:30:19 +0800 |
commit | bca951d79ed9d356c1a9f5a5f4d1ad5a943a3df2 (patch) | |
tree | e0b1425a084aa975db6affebee27a2fd209a1336 /components/script/script_runtime.rs | |
parent | 2304f02123038a2e729bc90a2e2db9a795f30158 (diff) | |
download | servo-bca951d79ed9d356c1a9f5a5f4d1ad5a943a3df2.tar.gz servo-bca951d79ed9d356c1a9f5a5f4d1ad5a943a3df2.zip |
Drop `TrustedPromise` before dropping JSRuntime
Diffstat (limited to 'components/script/script_runtime.rs')
-rw-r--r-- | components/script/script_runtime.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/components/script/script_runtime.rs b/components/script/script_runtime.rs index 18138dcc2b0..865382f091f 100644 --- a/components/script/script_runtime.rs +++ b/components/script/script_runtime.rs @@ -145,7 +145,10 @@ pub struct Runtime(RustRuntime); impl Drop for Runtime { fn drop(&mut self) { - THREAD_ACTIVE.with(|t| t.set(false)); + THREAD_ACTIVE.with(|t| { + LiveDOMReferences::destruct(); + t.set(false); + }); } } |