v8/test/mjsunit/regress/regress-crbug-1238467.js
Camillo Bruni dacb5acd83 [d8] Use more conservative error reporting in d8's async-hooks
d8 throws on unhandled rejected Promises since
https://crrev.com/c/2238569 so no special handling beyond throwing in
the async hooks themselves is needed.

Drive-by-fix: Use v8::Isolate* as local variable.

Bug: chromium:1238467
Change-Id: I271720cd9cfd1d30b58b5407c700b0f730910968
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3090333
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76255}
2021-08-12 12:39:10 +00:00

18 lines
454 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: --expose-async-hooks --ignore-unhandled-promises
const ah = async_hooks.createHook({});
ah.enable();
import("./does_not_exist.js").then();
function target() {
isFinite.__proto__.__proto__ = new Proxy(target, {
get() {
return Promise.resolve();
}})
}
target();