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

Unified Diff: content/browser/android/in_process/synchronous_compositor_impl.cc

Issue 1159883005: Fix crash in sync compositor registration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/android/in_process/synchronous_compositor_impl.cc
diff --git a/content/browser/android/in_process/synchronous_compositor_impl.cc b/content/browser/android/in_process/synchronous_compositor_impl.cc
index 5963ac59523e0ce806f1dd4df017b6745a73a212..4329ce5f9fa74c61587b1b61b31efe25b4a13da3 100644
--- a/content/browser/android/in_process/synchronous_compositor_impl.cc
+++ b/content/browser/android/in_process/synchronous_compositor_impl.cc
@@ -274,7 +274,9 @@ void SynchronousCompositorImpl::OnNeedsBeginFramesChange(
}
void SynchronousCompositorImpl::BeginFrame(const cc::BeginFrameArgs& args) {
- if (!registered_with_client_) {
+ if (!registered_with_client_ && is_active_ && renderer_needs_begin_frames_) {
+ // Make sure this is a BeginFrame that renderer side explicitly requested.
+ // Otherwise it is possible renderer objects not initialized.
RegisterWithClient();
DCHECK(registered_with_client_);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698