mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 22:52:22 +02:00
This cache is referenced by a few parts of the JS API spec, including the threads spec (such as in toFixedLengthBuffer), as well as the "refresh the Memory buffer" algorithm, which was implemented as a method of Memory before this change. Now, this algorithm can be implemented in a spec-like fashion (though it mostly seems to add extra complexity). This change also fixes a bug where memories that were re-exported from an imported WebAssembly.Memory were given a distinct WebAssembly.Memory object, since the caching that existed in Instance.cpp was instance-local, not global to the realm. We also make Memory::m_buffer non-lazy, since we have to implement "initialize a memory object" correctly anyway.
3.9 KiB
3.9 KiB