Index: test/mjsunit/wasm/import-memory.js |
diff --git a/test/mjsunit/wasm/import-memory.js b/test/mjsunit/wasm/import-memory.js |
index 178febdff471472d6bace5c9c935efdcd0416f33..b5dd620546798b1c60a5ec55c49907f2132523ab 100644 |
--- a/test/mjsunit/wasm/import-memory.js |
+++ b/test/mjsunit/wasm/import-memory.js |
@@ -149,6 +149,7 @@ load("test/mjsunit/wasm/wasm-module-builder.js"); |
(function TestGrowMemoryZeroInitialMemory() { |
print("ZeroInitialMemory"); |
+ let kV8MaxPages = 32767; |
let memory = new WebAssembly.Memory({initial: 0}); |
assertEquals(0, memory.buffer.byteLength); |
let i32 = new Int32Array(memory.buffer); |
@@ -176,7 +177,7 @@ load("test/mjsunit/wasm/wasm-module-builder.js"); |
for (offset = 5 * kPageSize; offset < 5 * kPageSize + 4; offset++) { |
assertThrows(load); |
} |
- assertThrows(() => memory.grow(16381)); |
+ assertThrows(() => memory.grow(kV8MaxPages - 3)); |
})(); |
(function ImportedMemoryBufferLength() { |