Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Side by Side Diff: test/mjsunit/wasm/table.js

Issue 2421453002: [wasm] Implement {Compile,Runtime}Error; fix traps from start function (Closed)
Patch Set: Fix merge artefact Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/mjsunit/wasm/errors.js ('k') | test/mjsunit/wasm/wasm-constants.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Flags: --expose-wasm 5 // Flags: --expose-wasm
6 6
7 'use strict';
8
7 // Basic tests. 9 // Basic tests.
8 10
9 var outOfUint32RangeValue = 1e12; 11 var outOfUint32RangeValue = 1e12;
10 var int32ButOob = 1073741824; 12 var int32ButOob = 1073741824;
11 13
12 function assertTableIsValid(table) { 14 function assertTableIsValid(table) {
13 assertSame(WebAssembly.Table.prototype, table.__proto__); 15 assertSame(WebAssembly.Table.prototype, table.__proto__);
14 assertSame(WebAssembly.Table, table.constructor); 16 assertSame(WebAssembly.Table, table.constructor);
15 assertTrue(table instanceof Object); 17 assertTrue(table instanceof Object);
16 assertTrue(table instanceof WebAssembly.Table); 18 assertTrue(table instanceof WebAssembly.Table);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 (function TestMaximumDoesHasProperty() { 88 (function TestMaximumDoesHasProperty() {
87 var hasPropertyWasCalled = false; 89 var hasPropertyWasCalled = false;
88 var desc = {element: "anyfunc", initial: 10}; 90 var desc = {element: "anyfunc", initial: 10};
89 var proxy = new Proxy({maximum: 16}, { 91 var proxy = new Proxy({maximum: 16}, {
90 has: function(target, name) { hasPropertyWasCalled = true; } 92 has: function(target, name) { hasPropertyWasCalled = true; }
91 }); 93 });
92 Object.setPrototypeOf(desc, proxy); 94 Object.setPrototypeOf(desc, proxy);
93 let table = new WebAssembly.Table(desc); 95 let table = new WebAssembly.Table(desc);
94 assertTableIsValid(table); 96 assertTableIsValid(table);
95 })(); 97 })();
OLDNEW
« no previous file with comments | « test/mjsunit/wasm/errors.js ('k') | test/mjsunit/wasm/wasm-constants.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698