Skip to content

Commit ec86f21

Browse files
authored
[wasm64] Rename index to address in new WebAssembly.Memory (#22785)
See WebAssembly/memory64#92
1 parent 218195c commit ec86f21

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/runtime_init_memory.js

+4
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ if (!ENVIRONMENT_IS_PTHREAD) {
4646
'shared': true,
4747
#endif
4848
#if MEMORY64 == 1
49+
'address': 'i64',
50+
// TODO(sbc): remove this alias for `address` once both firefox and
51+
// chrome roll out the spec change.
52+
// See https://github.com/WebAssembly/memory64/pull/92
4953
'index': 'i64',
5054
#endif
5155
});

src/runtime_shared.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ var toIndexType = (function() {
5555
var bigintMemoryBounds = 1;
5656
try {
5757
/** @suppress {checkTypes} */
58-
new WebAssembly.Memory({'initial': 1n, 'index': 'i64'});
58+
new WebAssembly.Memory({'initial': 1n, 'index': 'i64', 'address': 'i64'});
5959
} catch (e) {
6060
bigintMemoryBounds = 0;
6161
}

0 commit comments

Comments
 (0)