f2b90bd4dc
Cleanup decoding of flags so that invalid flags for sections other than memory are caught correctly. Bug: chromium:853453 Change-Id: Ia347d5f7672eee93ca3f6a743f06fba629f55cb5 Reviewed-on: https://chromium-review.googlesource.com/1104976 Commit-Queue: Deepti Gandluri <gdeepti@chromium.org> Reviewed-by: Ben Smith <binji@chromium.org> Cr-Commit-Position: refs/heads/master@{#53972}
19 lines
701 B
JavaScript
19 lines
701 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.
|
|
|
|
// Flags: --experimental-wasm-threads
|
|
|
|
assertThrows(() => new WebAssembly.Module(
|
|
new Uint8Array([
|
|
0x00, 0x61, 0x73, 0x6d, // wasm magic
|
|
0x01, 0x00, 0x00, 0x00, // wasm version
|
|
0x04, // section code
|
|
0x04, // section length
|
|
/* Section: Table */
|
|
0x01, // table count
|
|
0x70, // table type
|
|
0x03, // resizable limits flags
|
|
0x00])),
|
|
WebAssembly.CompileError);
|