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

Unified Diff: base/at_exit.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 | « no previous file | base/memory/ref_counted.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/at_exit.cc
diff --git a/base/at_exit.cc b/base/at_exit.cc
index 5dcc83cb2f5c390ab8cdbc19ba601ec3fd01ab0b..e0025ea0d3b3dd96f821d8a624cd51aaee5d0a6b 100644
--- a/base/at_exit.cc
+++ b/base/at_exit.cc
@@ -81,6 +81,10 @@ void AtExitManager::ProcessCallbacksNow() {
g_top_manager->processing_callbacks_ = true;
}
+ // Relax the cross-thread access restriction to non-thread-safe RefCount.
+ // It's safe since all other threads should be terminated at this point.
+ ScopedAllowCrossThreadRefCountAccess allow_cross_thread_ref_count_access;
+
while (!tasks.empty()) {
base::Closure task = tasks.top();
task.Run();
« no previous file with comments | « no previous file | base/memory/ref_counted.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698