v8/test/mjsunit/regress/regress-1115354.js
Marja Hölttä 97846e0357 [Atomics.waitAsync] Add regression test
Bug: v8:10239, chromium:1115354
Change-Id: I64b028b383dcff1e4224c945ee1f982d1979eb9d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2354813
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69430}
2020-08-17 15:36:53 +00:00

17 lines
490 B
JavaScript

// Copyright 2020 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-sharedarraybuffer --harmony-atomics-waitasync --expose-async-hooks
const sab = new SharedArrayBuffer(16);
const i32a = new Int32Array(sab);
const result = Atomics.waitAsync(i32a, 0, 0);
Atomics.notify(i32a, 0);
let hook = async_hooks.createHook(
{
promiseResolve: function() { }
});
hook.enable();