d4831b31b8
Fix WebAssembly's memory/grow js-api. The argument is a unsigned long, this change refactors most of arithmetic and bounds checks type from int64 to uint32_t, according to the spec. Bug: v8:8319 Change-Id: I662c704d1d50288ad68be70c72a3db7052a80014 Cq-Include-Trybots: luci.chromium.try:linux-blink-rel Reviewed-on: https://chromium-review.googlesource.com/c/1351028 Commit-Queue: Sven Sauleau <ssauleau@igalia.com> Reviewed-by: Adam Klein <adamk@chromium.org> Cr-Commit-Position: refs/heads/master@{#59008}
11 lines
334 B
JavaScript
11 lines
334 B
JavaScript
// Copyright 2018 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.
|
|
|
|
PAGES = 10;
|
|
memory = new WebAssembly.Memory({initial: PAGES});
|
|
buffer = memory.buffer;
|
|
buffer = new Uint8Array(buffer);
|
|
memory.grow(0);
|
|
WebAssembly.validate(buffer);
|