mirror of https://github.com/tc39/test262.git
[explicit-resource-management] Return undefined from dispose builtin
This CL fixes the bug of returning true in dispose method of DisposableStack. Bug: 385547086 Change-Id: Iddb72962bd5f7de1ee9346cda3094e98e0565119 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6119280 Reviewed-by: Shu-yu Guo <syg@chromium.org> Commit-Queue: Rezvan Mahdavi Hezaveh <rezvan@chromium.org> Cr-Commit-Position: refs/heads/main@{#97920}
This commit is contained in:
parent
c4317b0cb5
commit
8296db8873
|
@ -0,0 +1,18 @@
|
|||
// Copyright (C) 2024 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
description: |
|
||||
AsyncDisposableStack resolved with undefned.
|
||||
includes: [asyncHelpers.js]
|
||||
flags: [async]
|
||||
features: [explicit-resource-management]
|
||||
---*/
|
||||
|
||||
asyncTest(async function() {
|
||||
async function TestAsyncDisposableStackDefer() {
|
||||
let stack = new AsyncDisposableStack();
|
||||
assert.sameValue(await stack.disposeAsync(), undefined);
|
||||
};
|
||||
await TestAsyncDisposableStackDefer();
|
||||
});
|
|
@ -0,0 +1,13 @@
|
|||
// Copyright (C) 2024 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
description: |
|
||||
DisposableStack return undefned.
|
||||
features: [explicit-resource-management]
|
||||
---*/
|
||||
|
||||
(function TestDisposableStackDisposeReturnsUndefined() {
|
||||
let stack = new DisposableStack();
|
||||
assert.sameValue(stack.dispose(), undefined);
|
||||
})();
|
Loading…
Reference in New Issue