Commit 6102609b authored by Alexei Filippov's avatar Alexei Filippov Committed by Commit Bot

[runtime-call-stats] Add a null check to the debug code.

BUG=chromium:760649
TBR=cbruni@chromium.org

Change-Id: I9fcd6e25f78f3d6cbd563c77c96a5b175d1ba125
Reviewed-on: https://chromium-review.googlesource.com/707901Reviewed-by: 's avatarAlexei Filippov <alph@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48412}
parent 69d790e5
......@@ -489,9 +489,10 @@ void RuntimeCallStats::Leave(RuntimeCallStats* stats, RuntimeCallTimer* timer) {
DCHECK(stats->IsCalledOnTheSameThread());
if (stats->current_timer_.Value() != timer) {
// The branch is added to catch a crash crbug.com/760649
RuntimeCallTimer* stack_top = stats->current_timer_.Value();
EmbeddedVector<char, 200> text;
SNPrintF(text, "ERROR: Leaving counter '%s', stack top '%s'.\n",
timer->name(), stats->current_timer_.Value()->name());
timer->name(), stack_top ? stack_top->name() : "(null)");
USE(text);
CHECK(false);
}
......
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