From 1a5a2c7c5d43cfdf0c5086e83e3254ade7800e51 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 21 Sep 2021 15:30:07 -0500 Subject: [PATCH] Fix a merge conflict on `main` (#3378) This commit fixes a "merge conflict" with #3319 being merged into `main`, causing CI failures on merge. --- crates/wasmtime/src/func.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/wasmtime/src/func.rs b/crates/wasmtime/src/func.rs index abadbdb341..942c6ed426 100644 --- a/crates/wasmtime/src/func.rs +++ b/crates/wasmtime/src/func.rs @@ -766,8 +766,9 @@ impl Func { bail!("cross-`Store` values are not currently supported"); } } + let externref_params = ty.as_wasm_func_type().externref_params_count(); - let mut values_vec = write_params(store.0, params, results)?; + let mut values_vec = write_params(store.0, externref_params, params, results)?; // Call the trampoline. unsafe { @@ -789,6 +790,7 @@ impl Func { fn write_params( store: &mut StoreOpaque, + externref_params: usize, params: &[Val], results: &mut [Val], ) -> Result> { @@ -805,7 +807,7 @@ impl Func { // because otherwise we would either keep filling up the bump chunk // and making it larger and larger or we would always take the slow // path when inserting references into the table. - if ty.as_wasm_func_type().externref_params_count() + if externref_params > store .externref_activations_table() .bump_capacity_remaining()