f19142e613
This CL implements https://github.com/tc39/proposal-top-level-await/pull/159, which reached consensus at the March 2021 TC39. The high-level intent is for parent modules that depend on async modules to remember the DFS post-order such that when their async dependency finishes, they execute in that original post-order. This aligns the ordering between completely sync module graphs and async module graphs. Bug: v8:11557 Change-Id: I5bd8f38f040115c255ca1ce8253b9686fdb4af03 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2757901 Commit-Queue: Shu-yu Guo <syg@chromium.org> Reviewed-by: Camillo Bruni <cbruni@chromium.org> Reviewed-by: Adam Klein <adamk@chromium.org> Cr-Commit-Position: refs/heads/master@{#73551}
13 lines
376 B
JavaScript
13 lines
376 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
|
|
|
|
if (globalThis.test_order === undefined) {
|
|
globalThis.test_order = [];
|
|
}
|
|
globalThis.test_order.push('async before');
|
|
await 0;
|
|
globalThis.test_order.push('async after');
|