summaryrefslogtreecommitdiff
path: root/runtime/web_worker.rs
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/web_worker.rs')
-rw-r--r--runtime/web_worker.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs
index d81c82c50..e27229153 100644
--- a/runtime/web_worker.rs
+++ b/runtime/web_worker.rs
@@ -393,6 +393,13 @@ pub struct WebWorker {
maybe_worker_metadata: Option<WorkerMetadata>,
}
+impl Drop for WebWorker {
+ fn drop(&mut self) {
+ // clean up the package.json thread local cache
+ node_resolver::PackageJsonThreadLocalCache::clear();
+ }
+}
+
impl WebWorker {
pub fn bootstrap_from_options(
services: WebWorkerServiceOptions,