Skip to content

Commit

Permalink
remove messagaging and worker infra on workerscope exits
Browse files Browse the repository at this point in the history
  • Loading branch information
gterzian committed Jun 3, 2020
1 parent 6f34b52 commit f4d258d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions components/script/dom/workerglobalscope.rs
Expand Up @@ -161,7 +161,12 @@ impl WorkerGlobalScope {
}
}

/// Clear various items when the worker event-loop shuts-down.
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();
drop(runtime);
}
Expand Down

0 comments on commit f4d258d

Please sign in to comment.