-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Description
It would be great if updateGlobalBufferAndViews could notify embedder(s) and application code that the heap has been resized, I don't see any way to get at this information currently. Right now if the heap grows, any live typed arrays pointing at the wasm heap become useless garbage, which makes it very difficult to make use of typed arrays safely when interacting with a compiled wasm binary. The fact that detached arrays are intentionally designed to fail silently makes this hard to debug as well. If there were a notification or signal we could process, that would make it possible to at least build a "safe typedarray" abstraction around this with adequate performance characteristics (wrap a typedarray instance, indirect into it with get/set methods, etc)