Drop TrustedPromise before dropping JSRuntime

This commit is contained in:
CYBAI 2018-10-21 21:30:19 +08:00
parent 2304f02123
commit bca951d79e
2 changed files with 10 additions and 1 deletions

View file

@ -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);
});
}
}