e650b9e43e
When --async-stack-traces is on and there's an exception from within an async_hook "after" handler, we will be faced with a settled promise. In that case we cannot do anything, since the promise will not have any reactions on it anymore, but we should also not crash of course. Bug: chromium:896700, v8:7522 Change-Id: I6e3d212d0433da40740489ff7421c5a98cf9bff3 Reviewed-on: https://chromium-review.googlesource.com/c/1290550 Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#56801}
11 lines
318 B
JavaScript
11 lines
318 B
JavaScript
// Copyright 2018 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: --async-stack-traces --expose-async-hooks
|
|
|
|
async_hooks.createHook({
|
|
after() { throw new Error(); }
|
|
}).enable();
|
|
Promise.resolve().then();
|