Add more data to see which extension got leaked (#35272)
Part of https://github.com/zed-industries/zed/issues/35185 Release Notes: - N/A
This commit is contained in:
parent
9353ba7887
commit
5a218d8323
1 changed files with 25 additions and 4 deletions
|
@ -777,8 +777,18 @@ impl WasmExtension {
|
||||||
}
|
}
|
||||||
.boxed()
|
.boxed()
|
||||||
}))
|
}))
|
||||||
.expect("wasm extension channel should not be closed yet");
|
.unwrap_or_else(|_| {
|
||||||
return_rx.await.expect("wasm extension channel")
|
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()
|
.boxed_local()
|
||||||
}))
|
}))
|
||||||
.expect("main thread message channel should not be closed yet");
|
.unwrap_or_else(|_| {
|
||||||
async move { return_rx.await.expect("main thread message channel") }
|
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 {
|
fn work_dir(&self) -> PathBuf {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue