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

Unified Diff: cc/trees/proxy_impl.cc

Issue 2666423002: Assert sequence validity on non-thread-safe RefCount manipulations (2) (Closed)
Patch Set: rebase on ImageStorage fix Created 3 years, 10 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
Index: cc/trees/proxy_impl.cc
diff --git a/cc/trees/proxy_impl.cc b/cc/trees/proxy_impl.cc
index 0a8620eb7e724c3873aa24afa00413fe39945079..9a8c426841acc0405d10391138600ec312613b01 100644
--- a/cc/trees/proxy_impl.cc
+++ b/cc/trees/proxy_impl.cc
@@ -487,6 +487,12 @@ void ProxyImpl::ScheduledActionCommit() {
DCHECK(IsMainThreadBlocked());
DCHECK(commit_completion_event_);
+ // Relax the cross-thread access restriction to non-thread-safe RefCount.
+ // It's safe since the main thread is blocked while a main-thread-bound
+ // compositor stuff are accessed from the impl thread.
+ base::ScopedAllowCrossThreadRefCountAccess
+ allow_cross_thread_ref_count_access;
+
layer_tree_host_impl_->BeginCommit();
blocked_main_commit().layer_tree_host->FinishCommitOnImplThread(
layer_tree_host_impl_.get());

Powered by Google App Engine
This is Rietveld 408576698