| OLD | NEW | 
|---|
| 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 // TODO (mtrofin): re-enable ignition (v8:5345) | 5 // TODO (mtrofin): re-enable ignition (v8:5345) | 
| 6 // Flags: --no-ignition --no-ignition-staging | 6 // Flags: --no-turbo --no-ignition --no-ignition-staging | 
| 7 // Flags: --expose-wasm --expose-gc --allow-natives-syntax | 7 // Flags: --expose-wasm --expose-gc --allow-natives-syntax | 
| 8 | 8 | 
| 9 load("test/mjsunit/wasm/wasm-constants.js"); | 9 load("test/mjsunit/wasm/wasm-constants.js"); | 
| 10 load("test/mjsunit/wasm/wasm-module-builder.js"); | 10 load("test/mjsunit/wasm/wasm-module-builder.js"); | 
| 11 | 11 | 
| 12 | 12 | 
| 13 (function CompiledModuleInstancesAreGCed() { | 13 (function CompiledModuleInstancesAreGCed() { | 
| 14   var builder = new WasmModuleBuilder(); | 14   var builder = new WasmModuleBuilder(); | 
| 15 | 15 | 
| 16   builder.addMemory(1,1, true); | 16   builder.addMemory(1,1, true); | 
| (...skipping 24 matching lines...) Expand all  Loading... | 
| 41   assertEquals(2, i2.exports.f()); | 41   assertEquals(2, i2.exports.f()); | 
| 42   i2 = null; | 42   i2 = null; | 
| 43   gc(); | 43   gc(); | 
| 44   %ValidateWasmModuleState(module); | 44   %ValidateWasmModuleState(module); | 
| 45   var i4 = new WebAssembly.Instance(module, {getValue: () => 4}); | 45   var i4 = new WebAssembly.Instance(module, {getValue: () => 4}); | 
| 46   assertEquals(4, i4.exports.f()); | 46   assertEquals(4, i4.exports.f()); | 
| 47   module = null; | 47   module = null; | 
| 48   gc(); | 48   gc(); | 
| 49   %ValidateWasmOrphanedInstance(i4); | 49   %ValidateWasmOrphanedInstance(i4); | 
| 50 })(); | 50 })(); | 
| OLD | NEW | 
|---|