Skip to content

Commit 9669681

Browse files
committed
Revert "Record post_return only if it exists"
This reverts commit 7c4a367. Post-return needs to be called unconditionally for component model.
1 parent 634c287 commit 9669681

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

  • crates/wasmtime/src/runtime/component

crates/wasmtime/src/runtime/component/func.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,11 @@ impl Func {
733733

734734
fn post_return_impl(&self, mut store: impl AsContextMut) -> Result<()> {
735735
let mut store = store.as_context_mut();
736+
component_hooks::record_wasm_func_post_return(
737+
self.instance.id().instance(),
738+
self.index,
739+
&mut store,
740+
)?;
736741

737742
let index = self.index;
738743
let vminstance = self.instance.id().get(store.0);
@@ -786,11 +791,6 @@ impl Func {
786791
// intentionally leaves the instance in a "poisoned" state where it
787792
// can no longer be entered because `may_enter` is `false`.
788793
if let Some(func) = post_return {
789-
component_hooks::record_wasm_func_post_return(
790-
self.instance.id().instance(),
791-
self.index,
792-
&mut store,
793-
)?;
794794
crate::Func::call_unchecked_raw(
795795
&mut store,
796796
func,

0 commit comments

Comments
 (0)