Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(410)

Issue 2930813002: Avoid DCHECK in ExternalBeginFrameSource::GetMissedBeginFrameArgs caused by out of order frame time (Closed)

Created:
3 years, 6 months ago by stanisc
Modified:
3 years, 6 months ago
Reviewers:
sunnyps
CC:
chromium-reviews, cc-bugs_chromium.org, scheduler-bugs_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Avoid 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -1 line) Patch
M cc/scheduler/begin_frame_source.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/scheduler/begin_frame_source_unittest.cc View 1 2 chunks +25 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (14 generated)
stanisc
PTAL!
3 years, 6 months ago (2017-06-07 23:09:33 UTC) #6
sunnyps
lgtm % nits nit: The CL description says "Fix DCHECK" but it's not actually a ...
3 years, 6 months ago (2017-06-07 23:22:24 UTC) #7
stanisc
https://codereview.chromium.org/2930813002/diff/1/cc/scheduler/begin_frame_source_unittest.cc File cc/scheduler/begin_frame_source_unittest.cc (right): https://codereview.chromium.org/2930813002/diff/1/cc/scheduler/begin_frame_source_unittest.cc#newcode596 cc/scheduler/begin_frame_source_unittest.cc:596: EXPECT_CALL(*obs_, OnBeginFrame(CreateBeginFrameArgsForTesting( On 2017/06/07 23:22:24, sunnyps wrote: > nit: ...
3 years, 6 months ago (2017-06-07 23:36:33 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2930813002/20001
3 years, 6 months ago (2017-06-08 01:08:29 UTC) #16
commit-bot: I haz the power
3 years, 6 months ago (2017-06-08 01:13:42 UTC) #19
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/25d005fb3364df055d7773cffe70...

Powered by Google App Engine
This is Rietveld 408576698