Chromium Code Reviews
DescriptionAvoid DCHECK in ExternalBeginFrameSource::GetMissedBeginFrameArgs caused by out of order frame time
DCHECK was caused by incorrectly inverting the logical check in
ExternalBeginFrameSource::AddObserver when refactoring the code.
Before the change:
if (!last_args.IsValid() ||
(last_begin_frame_args_.frame_time > last_args.frame_time)) {
// Generate MISSED args here
...
}
After the change:
if (last_args.IsValid() &&
last_begin_frame_args_.frame_time == last_args.frame_time) {
// SKIP generating MISSED args
return BeginFrameArgs();
}
last_begin_frame_args_.frame_time which is smaller than last_args.frame_time,
while arguably invalid, would now allow this code to generate a MISSED args
and trigger a DCHECK.
I've fixed this by changing the condition above to
last_begin_frame_args_.frame_time <= last_args.frame_time.
I've added a new unit test to cover this specific case.
BUG=730218
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel
Review-Url: https://codereview.chromium.org/2930813002
Cr-Commit-Position: refs/heads/master@{#477846}
Committed: https://chromium.googlesource.com/chromium/src/+/25d005fb3364df055d7773cffe7039cfd3d33eca
Patch Set 1 #
Total comments: 2
Patch Set 2 : Addressed CR feedback #
Messages
Total messages: 19 (14 generated)
|
||||||||||||||||||||||||||||