pooling needs the store earlier

This commit is contained in:
Pat Hickey
2021-10-20 16:53:24 -07:00
parent 9d1b24632e
commit 67a6c27e22
2 changed files with 10 additions and 6 deletions

View File

@@ -384,6 +384,12 @@ impl InstancePool {
instance.host_state = std::mem::replace(&mut req.host_state, Box::new(()));
instance.wasm_data = &*req.wasm_data;
// set_instance_memories and _tables will need the store before we can completely
// initialize the vmcontext.
if let Some(store) = req.store.as_raw() {
instance.set_store(store);
}
Self::set_instance_memories(
instance,
self.memories.get(index),