2dd28df97a
This moves all tests that construct a wasm module (and load wasm-module-builder.js) from test/regress to the test/regress/wasm directory. This will make it easier to skip them all in the v8_enable_webassembly=false configuration. R=ahaas@chromium.org Bug: v8:11238 Change-Id: Ib22b0fb40a58f213182e68b78b34041651c436d1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2712243 Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/master@{#72942}
17 lines
604 B
JavaScript
17 lines
604 B
JavaScript
// Copyright 2017 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: --expose-wasm
|
|
|
|
load("test/mjsunit/wasm/wasm-module-builder.js");
|
|
|
|
var builder = new WasmModuleBuilder();
|
|
builder.addImportedTable("x", "table", 1, 10000000);
|
|
let module = new WebAssembly.Module(builder.toBuffer());
|
|
let table = new WebAssembly.Table({element: "anyfunc",
|
|
initial: 1, maximum:1000000});
|
|
let instance = new WebAssembly.Instance(module, {x: {table:table}});
|
|
|
|
assertThrows(() => table.grow(Infinity), TypeError);
|