From 25a3e85589864ec57164e1af0e9195b4ccfaef17 Mon Sep 17 00:00:00 2001 From: Yang Guo Date: Mon, 22 Feb 2021 14:50:03 +0100 Subject: [PATCH] [d8] delete timer id upon console.timeEnd This problem was found by Mathieu Schroeter , who also suggested this fix. Kudos! R=cbruni@chromium.org Change-Id: I8865d1ea6dea29514c69296145cf72958ea8acb1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2712566 Commit-Queue: Yang Guo Commit-Queue: Camillo Bruni Auto-Submit: Yang Guo Reviewed-by: Camillo Bruni Cr-Commit-Position: refs/heads/master@{#72913} --- src/d8/d8-console.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/d8/d8-console.cc b/src/d8/d8-console.cc index 5ecdf6767b..7f0904e343 100644 --- a/src/d8/d8-console.cc +++ b/src/d8/d8-console.cc @@ -112,6 +112,7 @@ void D8Console::TimeEnd(const debug::ConsoleCallArguments& args, auto find = timers_.find(string); if (find != timers_.end()) { delta = now - find->second; + timers_.erase(find); } printf("console.timeEnd: %s, %f\n", *utf8, delta.InMillisecondsF()); }