Commit c0cbe025 authored by Joe Mason's avatar Joe Mason Committed by Commit Bot

Fix over-eager DCHECK in V8PerFrameMemoryReporterImpl

R=siggi

Bug: 1096543
Change-Id: I42a0f40fa895117ed03b6173f5f1bb27b905b9e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2259485
Auto-Submit: Joe Mason <joenotcharles@chromium.org>
Reviewed-by: default avatarSigurður Ásgeirsson <siggi@chromium.org>
Commit-Queue: Joe Mason <joenotcharles@chromium.org>
Cr-Commit-Position: refs/heads/master@{#781339}
parent 5145aaf2
...@@ -67,8 +67,12 @@ class FrameAssociatedMeasurementDelegate : public v8::MeasureMemoryDelegate { ...@@ -67,8 +67,12 @@ class FrameAssociatedMeasurementDelegate : public v8::MeasureMemoryDelegate {
if (!per_frame_resources) { if (!per_frame_resources) {
#if DCHECK_IS_ON() #if DCHECK_IS_ON()
// Check that the frame token didn't already occur. // Check that the frame token didn't already occur.
for (const auto& entry : frames) for (const auto& entry : frames) {
// This frame was already added to the map by frames[frame] above.
if (frame == entry.first)
continue;
DCHECK_NE(entry.first->GetFrameToken(), frame->GetFrameToken()); DCHECK_NE(entry.first->GetFrameToken(), frame->GetFrameToken());
}
#endif #endif
auto new_resources = mojom::PerFrameV8MemoryUsageData::New(); auto new_resources = mojom::PerFrameV8MemoryUsageData::New();
new_resources->frame_token = frame->GetFrameToken(); new_resources->frame_token = frame->GetFrameToken();
......
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