Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Add more data to see which extension got leaked (#35272)
Kirill Bulatov5a218d832316
diff --git a/crates/extension_host/src/wasm_host.rs b/crates/extension_host/src/wasm_host.rsindex 1f6f5035e32..d909d06f6b9 100644--- a/crates/extension_host/src/wasm_host.rs+++ b/crates/extension_host/src/wasm_host.rs@@ -777,8 +777,18 @@ impl WasmExtension {}.boxed()}))- .expect("wasm extension channel should not be closed yet");- return_rx.await.expect("wasm extension channel")+ .unwrap_or_else(|_| {+ panic!(+ "wasm extension channel should not be closed yet, extension {} (id {})",+ self.manifest.name, self.manifest.id,+ )+ });+ return_rx.await.unwrap_or_else(|_| {+ panic!(+ "wasm extension channel, extension {} (id {})",+ self.manifest.name, self.manifest.id,+ )+ })}}@@ -799,8 +809,19 @@ impl WasmState {}.boxed_local()}))- .expect("main thread message channel should not be closed yet");- async move { return_rx.await.expect("main thread message channel") }+ .unwrap_or_else(|_| {+ panic!(+ "main thread message channel should not be closed yet, extension {} (id {})",+ self.manifest.name, self.manifest.id,+ )+ });+ let name = self.manifest.name.clone();+ let id = self.manifest.id.clone();+ async move {+ return_rx.await.unwrap_or_else(|_| {+ panic!("main thread message channel, extension {name} (id {id})")+ })+ }}fn work_dir(&self) -> PathBuf {