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

Side by Side Diff: test/mjsunit/wasm/instantiate-module-basic.js

Issue 2529573002: Revert of [wasm] WebAssembly.Memory object can be referenced by multiple Instance objects. (Closed)
Patch Set: Created 4 years 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/import-memory.js ('k') | test/mjsunit/wasm/memory-instance-validation.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 load("test/mjsunit/wasm/wasm-constants.js"); 7 load("test/mjsunit/wasm/wasm-constants.js");
8 load("test/mjsunit/wasm/wasm-module-builder.js"); 8 load("test/mjsunit/wasm/wasm-module-builder.js");
9 9
10 let kReturnValue = 117; 10 let kReturnValue = 117;
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 208
209 var module = new WebAssembly.Module(builder.toBuffer()); 209 var module = new WebAssembly.Module(builder.toBuffer());
210 var i1 = new WebAssembly.Instance(module, null, mem_1); 210 var i1 = new WebAssembly.Instance(module, null, mem_1);
211 var i2 = new WebAssembly.Instance(module, null, mem_2); 211 var i2 = new WebAssembly.Instance(module, null, mem_2);
212 212
213 assertEquals(1, i1.exports.f()); 213 assertEquals(1, i1.exports.f());
214 assertEquals(1000, i2.exports.f()); 214 assertEquals(1000, i2.exports.f());
215 })(); 215 })();
216 216
217 (function MustBeMemory() { 217 (function MustBeMemory() {
218 print("MustBeMemory...");
219 var memory = new ArrayBuffer(65536); 218 var memory = new ArrayBuffer(65536);
220 var module = new WebAssembly.Module(buffer); 219 var module = new WebAssembly.Module(buffer);
221 assertThrows(() => new WebAssembly.Instance(module, null, memory), TypeError); 220 assertThrows(() => new WebAssembly.Instance(module, null, memory), TypeError);
222 })(); 221 })();
OLDNEW
« no previous file with comments | « test/mjsunit/wasm/import-memory.js ('k') | test/mjsunit/wasm/memory-instance-validation.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698