Commit 25a3e855 authored by Yang Guo's avatar Yang Guo Committed by Commit Bot

[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: 's avatarCamillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72913}
parent 075c4ffe
...@@ -112,6 +112,7 @@ void D8Console::TimeEnd(const debug::ConsoleCallArguments& args, ...@@ -112,6 +112,7 @@ void D8Console::TimeEnd(const debug::ConsoleCallArguments& args,
auto find = timers_.find(string); auto find = timers_.find(string);
if (find != timers_.end()) { if (find != timers_.end()) {
delta = now - find->second; delta = now - find->second;
timers_.erase(find);
} }
printf("console.timeEnd: %s, %f\n", *utf8, delta.InMillisecondsF()); printf("console.timeEnd: %s, %f\n", *utf8, delta.InMillisecondsF());
} }
......
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