OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // Flags: --allow-natives-syntax --harmony-dynamic-import |
| 6 |
| 7 var ran = false; |
| 8 |
| 9 async function test() { |
| 10 try { |
| 11 let x = await import('modules-skip-1.js'); |
| 12 // modules-skip-5.js statically imports modules-skip-1.js |
| 13 let y = await import('modules-skip-5.js'); |
| 14 assertSame(x, y.static_life); |
| 15 |
| 16 let z = await import('modules-skip-1.js'); |
| 17 assertSame(x, z); |
| 18 ran = true; |
| 19 } catch(e) { |
| 20 %AbortJS('failure: '+ e.message); |
| 21 } |
| 22 } |
| 23 |
| 24 test(); |
| 25 %RunMicrotasks(); |
| 26 assertTrue(ran); |
OLD | NEW |