Commit 4ddb0347 authored by Camillo Bruni's avatar Camillo Bruni Committed by Commit Bot

[d8] Avoid printing unhandled rejected Promises in Shell::RunMain

This simplification helps with correctness fuzzers where Promises
created during error printing are flakily handled.

We might skip over certain rejected Promises that were created after
finishing running the script. This seems to be a reasonable compromise
in helping debugging scripts with unhandled rejections in d8.

Bug: chromium:1126309
Change-Id: Ia87c80cfd390bf8c6a724dc2f0e9e5fd1599e332
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2460814Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70410}
parent e78f4c7e
......@@ -3572,7 +3572,6 @@ int Shell::RunMain(Isolate* isolate, bool last_run) {
PerIsolateData::RealmScope realm_scope(PerIsolateData::Get(isolate));
if (!options.isolate_sources[0].Execute(isolate)) success = false;
if (!CompleteMessageLoop(isolate)) success = false;
if (!HandleUnhandledPromiseRejections(isolate)) success = false;
}
if (!use_existing_context) {
DisposeModuleEmbedderData(context);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment