From be37bd11a702b7523297189b1b1049a1a62afe45 Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Thu, 18 Dec 2025 20:15:27 -0500 Subject: [PATCH] Restore wasm_host.rs to origin/main --- crates/extension_host/src/wasm_host.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/crates/extension_host/src/wasm_host.rs b/crates/extension_host/src/wasm_host.rs index 7b38ef5ab630ac20a0a94daf4d9a5118059afce8..a6e5768f16243ce6c6a4d250002e29d5db06a071 100644 --- a/crates/extension_host/src/wasm_host.rs +++ b/crates/extension_host/src/wasm_host.rs @@ -1,11 +1,9 @@ -pub mod llm_provider; pub mod wit; use crate::capability_granter::CapabilityGranter; use crate::{ExtensionManifest, ExtensionSettings}; use anyhow::{Context as _, Result, anyhow, bail}; use async_trait::async_trait; - use dap::{DebugRequest, StartDebuggingRequestArgumentsRequest}; use extension::{ CodeLabel, Command, Completion, ContextServerConfiguration, DebugAdapterBinary, @@ -66,7 +64,7 @@ pub struct WasmHost { #[derive(Clone, Debug)] pub struct WasmExtension { - tx: Arc>, + tx: UnboundedSender, pub manifest: Arc, pub work_dir: Arc, #[allow(unused)] @@ -76,10 +74,7 @@ pub struct WasmExtension { impl Drop for WasmExtension { fn drop(&mut self) { - // Only close the channel when this is the last clone holding the sender - if Arc::strong_count(&self.tx) == 1 { - self.tx.close_channel(); - } + self.tx.close_channel(); } } @@ -676,7 +671,7 @@ impl WasmHost { Ok(WasmExtension { manifest, work_dir, - tx: Arc::new(tx), + tx, zed_api_version, _task: task, })