Skip to content

Commit

Permalink
Remove incorrect DCHECK from WindowPerformance::RegisterEventTiming
Browse files Browse the repository at this point in the history
Clusterfuzz tells us that GetFrame() could be null when
WindowPerformance::RegisterEventTiming is called, so this CL removes
the DCHECK and bails out early instead.

Bug: 861627
Change-Id: Ic109e8153a80832324d9c3cf27e1bed957d2b1c2
Reviewed-on: https://chromium-review.googlesource.com/1131226
Reviewed-by: Steve Kobes <skobes@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573769}
  • Loading branch information
npm1 authored and Commit Bot committed Jul 10, 2018
1 parent dd87e8c commit 3641b5f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions third_party/blink/renderer/core/timing/window_performance.cc
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,13 @@ void WindowPerformance::RegisterEventTiming(String event_type,
DCHECK(!processing_start.is_null());
DCHECK(!processing_end.is_null());
DCHECK_GE(processing_end, processing_start);
if (!GetFrame())
return;

PerformanceEventTiming* entry = PerformanceEventTiming::Create(
event_type, MonotonicTimeToDOMHighResTimeStamp(start_time),
MonotonicTimeToDOMHighResTimeStamp(processing_start),
MonotonicTimeToDOMHighResTimeStamp(processing_end), cancelable);

DCHECK(GetFrame());
event_timings_.push_back(entry);
WebLayerTreeView* layerTreeView =
GetFrame()->GetChromeClient().GetWebLayerTreeView(GetFrame());
Expand Down

0 comments on commit 3641b5f

Please sign in to comment.