[d8] delete timer id upon console.timeEnd

This problem was found by Mathieu Schroeter <gamesover.ch@gmail.com>, 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 <yangguo@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Yang Guo <yangguo@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72913}
This commit is contained in:
Yang Guo 2021-02-22 14:50:03 +01:00 committed by Commit Bot
parent 075c4ffe61
commit 25a3e85589

View File

@ -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());
}