Skip to content

Commit

Permalink
Use BigInt parameter in 16gb-wasm-memory tests
Browse files Browse the repository at this point in the history
The JS API for Memory was updated in WebAssembly/memory64#68 to require BigInt parameters.
  • Loading branch information
backes committed Oct 2, 2024
1 parent 0f39bef commit 9485f78
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
(() => {
let view;
try {
view = new Uint8Array(new WebAssembly.Memory({ index: 'i64', initial: SIZE / PAGE }).buffer);
view = new Uint8Array(new WebAssembly.Memory({ index: 'i64', initial: BigInt(SIZE / PAGE) }).buffer);
} catch (e) {
testPassed(`Allocating ${SIZE} threw: ${e}`);
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
(() => {
let view;
try {
view = new Uint8Array(new WebAssembly.Memory({ index: 'i64', initial: SIZE / PAGE }).buffer);
view = new Uint8Array(new WebAssembly.Memory({ index: 'i64', initial: BigInt(SIZE / PAGE) }).buffer);
} catch (e) {
testPassed(`Allocating ${SIZE} threw: ${e}`);
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
(() => {
let view;
try {
view = new Uint8Array(new WebAssembly.Memory({ index: 'i64', initial: SIZE / PAGE }).buffer);
view = new Uint8Array(new WebAssembly.Memory({ index: 'i64', initial: BigInt(SIZE / PAGE) }).buffer);
} catch (e) {
testPassed(`Allocating ${SIZE} threw: ${e}`);
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
(() => {
let view;
try {
view = new Uint8Array(new WebAssembly.Memory({ index: 'i64', initial: SIZE / PAGE }).buffer);
view = new Uint8Array(new WebAssembly.Memory({ index: 'i64', initial: BigInt(SIZE / PAGE) }).buffer);
} catch (e) {
testPassed(`Allocating ${SIZE} threw: ${e}`);
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
(() => {
let view;
try {
view = new Uint8Array(new WebAssembly.Memory({ index: 'i64', initial: SIZE / PAGE }).buffer);
view = new Uint8Array(new WebAssembly.Memory({ index: 'i64', initial: BigInt(SIZE / PAGE) }).buffer);
} catch (e) {
testPassed(`Allocating ${SIZE} threw: ${e}`);
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
(() => {
let view;
try {
view = new Uint8Array(new WebAssembly.Memory({ index: 'i64', initial: SIZE / PAGE }).buffer);
view = new Uint8Array(new WebAssembly.Memory({ index: 'i64', initial: BigInt(SIZE / PAGE) }).buffer);
} catch (e) {
testPassed(`Allocating ${SIZE} threw: ${e}`);
return;
Expand Down

0 comments on commit 9485f78

Please sign in to comment.