mirror of
				https://github.com/tc39/test262.git
				synced 2025-10-31 19:53:50 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			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);
 |