Commit a7ec5a8e authored by Sadrul Habib Chowdhury's avatar Sadrul Habib Chowdhury Committed by Chromium LUCI CQ

[webview] Speculative fix for a crash.

When starting a new vsync/frame, the previous frame should explicitly be
marked as 'did not produce frame'. This assertion is failing on webview.
So introduce a speculative fix for the crash to unblock the release,
while we investigate the underlying issue.

BUG=1144353

Change-Id: I436cc0a0115287967f9007a91e40ec41b3b69f84
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2626770Reviewed-by: default avatarBehdad Bakhshinategh <behdadb@chromium.org>
Commit-Queue: Sadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#843017}
parent 3774bdb6
...@@ -78,9 +78,18 @@ void CompositorFrameReportingController::WillBeginImplFrame( ...@@ -78,9 +78,18 @@ void CompositorFrameReportingController::WillBeginImplFrame(
if (reporters_[PipelineStage::kBeginImplFrame]) { if (reporters_[PipelineStage::kBeginImplFrame]) {
auto& reporter = reporters_[PipelineStage::kBeginImplFrame]; auto& reporter = reporters_[PipelineStage::kBeginImplFrame];
DCHECK(reporter->did_finish_impl_frame()); DCHECK(reporter->did_finish_impl_frame());
DCHECK(reporter->did_not_produce_frame()); // TODO(1144353): This is a speculative fix. This code should only be
reporter->TerminateFrame(FrameTerminationStatus::kDidNotProduceFrame, // reached after the previous frame have been explicitly marked as 'did not
reporter->did_not_produce_frame_time()); // produce frame', i.e. this code should have a DCHECK instead of a
// conditional:
// DCHECK(reporter->did_not_produce_frame()).
if (reporter->did_not_produce_frame()) {
reporter->TerminateFrame(FrameTerminationStatus::kDidNotProduceFrame,
reporter->did_not_produce_frame_time());
} else {
reporter->TerminateFrame(FrameTerminationStatus::kReplacedByNewReporter,
Now());
}
} }
auto reporter = std::make_unique<CompositorFrameReporter>( auto reporter = std::make_unique<CompositorFrameReporter>(
active_trackers_, args, latency_ukm_reporter_.get(), active_trackers_, args, latency_ukm_reporter_.get(),
......
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