9689b17687
There is a bug in the top-level await spec draft such that async strongly connected components are not always evaluated before their depending modules. See https://github.com/tc39/proposal-top-level-await/pull/161 for full discussion and spec fix. Bug: v8:11376 Change-Id: I88bf06afb2e9a5d8d0b757de8276f1d1242a875e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2667772 Reviewed-by: Adam Klein <adamk@chromium.org> Reviewed-by: Camillo Bruni <cbruni@chromium.org> Commit-Queue: Shu-yu Guo <syg@chromium.org> Cr-Commit-Position: refs/heads/master@{#72508}
13 lines
351 B
JavaScript
13 lines
351 B
JavaScript
// Copyright 2021 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: --harmony-top-level-await
|
|
|
|
import "modules-skip-async-cycle-start.mjs"
|
|
|
|
assertEquals(globalThis.test_order, [
|
|
'2', 'async before', 'async after', '1',
|
|
'3', 'start',
|
|
]);
|