[explicit-resource-management] Fix await using in top level module

This CL adds one suspend point in any scope that has at least one
`await using` in it.

Bug: 396661138
Change-Id: I144a0ca49395b34309e7e35f070c98cc145af34b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6279751
Commit-Queue: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#98811}
This commit is contained in:
Rezvan Mahdavi Hezaveh 2025-02-19 12:21:26 -08:00 committed by test262-merge-bot
parent 6d5e6c229e
commit b3f67f4aaf
1 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,14 @@
// Copyright (C) 2025 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: await using should be allowed in top-level module.
flags: [module]
features: [explicit-resource-management]
---*/
await using x = {
[Symbol.asyncDispose]() {
return 42;
},
};