WebNitroErrorSlot.alloc constructor

WebNitroErrorSlot.alloc(
  1. NitroWasmModule module
)

Allocates a zeroed slot in module's heap.

Implementation

factory WebNitroErrorSlot.alloc(NitroWasmModule module) {
  final ptr = module.malloc(sizeInBytes);
  module.writeBytes(ptr, Uint8List(sizeInBytes));
  return WebNitroErrorSlot._(module, ptr);
}