Chromium Code Reviews| 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(); |