[inspector][fuzzer] Fix timeouts on endless loops

The watchdog previously didn't terminate execution, it just prevented
the execution of additional tasks.
This CL fixes that by making {TaskRunner::Terminate} actually terminate
execution in the isolate.

It also adds a regression test for this.

R=szuend@chromium.org

Bug: chromium:1154412, chromium:1142437
Change-Id: Ic6638e8a5c37e8840a85651b4d4bea2ee0f71c43
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2622212
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72031}
This commit is contained in:
Clemens Backes 2021-01-11 17:07:23 +01:00 committed by Commit Bot
parent 8361a59f89
commit 1f7721b1a2
2 changed files with 2 additions and 0 deletions

View File

@ -0,0 +1 @@
while (1) {}

View File

@ -116,6 +116,7 @@ void TaskRunner::Append(std::unique_ptr<Task> task) {
void TaskRunner::Terminate() { void TaskRunner::Terminate() {
is_terminated_++; is_terminated_++;
isolate()->TerminateExecution();
process_queue_semaphore_.Signal(); process_queue_semaphore_.Signal();
} }