v8/test/mjsunit/wasm/resizablearraybuffer-growablesharedarraybuffer-wasm.js
Marja Hölttä 3fd463c6f9 [rab / gsab] Fix .maxByteLength for wasm memory buffers
Bug: v8:11111,v8:12746,chromium:1307480
Change-Id: I7775776ae98c3727b435aca4f269400ff8e31c53
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3560440
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79705}
2022-04-01 08:12:41 +00:00

16 lines
470 B
JavaScript

// Copyright 2022 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-rab-gsab
(function TestMemoryBufferNotResizable() {
const m = new WebAssembly.Memory({
initial: 128
});
assertFalse(m.buffer.resizable);
// For non-resizable buffers, maxByteLength returns byteLength.
assertEquals(m.buffer.maxByteLength, m.buffer.byteLength);
})();