2a08adbb6b
With async_hooks it's also possible that the "current microtask" is an await task, whose generator is already suspended, when there's an exception thrown in the AFTER callback. In that case we cannot build a meaningful async stack trace. Bug: chromium:897406, v8:7522 Change-Id: I682dc1fc3ebb1864e1c2061041ff99ced0313f0c Reviewed-on: https://chromium-review.googlesource.com/c/1292057 Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#56839}
15 lines
341 B
JavaScript
15 lines
341 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();
|
|
|
|
(async function() {
|
|
await 1;
|
|
await 1;
|
|
})();
|