(caller: &mut Caller<JavaState>)
| 26 | |
| 27 | impl WasmAlloc { |
| 28 | pub fn from_caller(caller: &mut Caller<JavaState>) -> Option<Self> { |
| 29 | let memory = caller |
| 30 | .get_export(MEMORY_EXPORT) |
| 31 | .and_then(Extern::into_memory); |
| 32 | let alloc = caller.get_export(ALLOC_EXPORT).and_then(Extern::into_func); |
| 33 | let dealloc = caller |
| 34 | .get_export(DEALLOC_EXPORT) |
| 35 | .and_then(Extern::into_func); |
| 36 | |
| 37 | Self::from(memory, alloc, dealloc) |
| 38 | } |
| 39 | |
| 40 | pub fn from_instance(instance: &Instance, mut store: impl AsContextMut) -> Option<Self> { |
| 41 | Self::from( |
nothing calls this directly
no outgoing calls
no test coverage detected