mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
remove messagaging and worker infra on workerscope exits
This commit is contained in:
parent
6f34b52e39
commit
f4d258d674
1 changed files with 5 additions and 0 deletions
|
@ -161,7 +161,12 @@ impl WorkerGlobalScope {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Clear various items when the worker event-loop shuts-down.
|
||||||
pub fn clear_js_runtime(&self) {
|
pub fn clear_js_runtime(&self) {
|
||||||
|
self.upcast::<GlobalScope>()
|
||||||
|
.remove_web_messaging_and_dedicated_workers_infra();
|
||||||
|
|
||||||
|
// Drop the runtime.
|
||||||
let runtime = self.runtime.borrow_mut().take();
|
let runtime = self.runtime.borrow_mut().take();
|
||||||
drop(runtime);
|
drop(runtime);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue