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

Unified Diff: ppapi/shared_impl/tracked_callback.cc

Issue 2666423002: Assert sequence validity on non-thread-safe RefCount manipulations (2) (Closed)
Patch Set: remove DisableSequenceConsistencyAssertions Created 3 years, 9 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 | « ppapi/shared_impl/proxy_lock.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/tracked_callback.cc
diff --git a/ppapi/shared_impl/tracked_callback.cc b/ppapi/shared_impl/tracked_callback.cc
index 8a689dd1d65680ebc1eb7d0e033d6f591b9d0ed7..8c38c6241c160bbaa890d42ffecaf26c96d51e44 100644
--- a/ppapi/shared_impl/tracked_callback.cc
+++ b/ppapi/shared_impl/tracked_callback.cc
@@ -228,6 +228,11 @@ void TrackedCallback::MarkAsCompletedWithLock() {
if (resource_id_)
tracker_->Remove(thiz);
tracker_ = NULL;
+
+ // Relax the cross-thread access restriction to non-thread-safe RefCount.
+ // |lock_| protects the access to Resource instances.
+ base::ScopedAllowCrossThreadRefCountAccess
+ allow_cross_thread_ref_count_access;
target_loop_ = NULL;
}
« no previous file with comments | « ppapi/shared_impl/proxy_lock.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698