mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
21e53c53a8
In bug 1673818 an intermediary getter was introduced for the buffer length, in anticipation of larger buffers and a distinction between 32-bit and 64-bit wasm memories. This getter asserts that the value it gets is below the limit for the appropriate memory type, eg, ByteLength32 asserts that the value it gets is below MaxMemory32Bytes, which is currently 2^31-64K. However, ArrayBuffers up to 2^31-1 can be constructed and passed to asm.js, so asm.js must not use this getter until after it has validated that the buffer length is below MaxMemory32Bytes. Thus we use the unchecked byteLength() accessor on the buffer, and introduce an additional guard in IsValidAsmJSHeapLength that the length is also a valid wasm length. This will have no impact on asm.js in SpiderMonkey as the largest valid asm.js length is already below the wasm maximum. (The largest valid asm.js length is the largest value below 2^31-1 whose low 24 bits are all zero.) Differential Revision: https://phabricator.services.mozilla.com/D95563 |
||
---|---|---|
.. | ||
ductwork/debugger | ||
examples | ||
public | ||
rust | ||
src | ||
xpconnect | ||
app.mozbuild | ||
ffi.configure | ||
moz.build | ||
moz.configure | ||
sub.configure |