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

Unified Diff: chrome/browser/chromeos/gdata/gdata_file_system.cc

Issue 10198034: Add more allow-wait suppressions on cros. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 | « base/threading/thread_restrictions.h ('k') | dbus/bus.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/gdata/gdata_file_system.cc
===================================================================
--- chrome/browser/chromeos/gdata/gdata_file_system.cc (revision 134126)
+++ chrome/browser/chromeos/gdata/gdata_file_system.cc (working copy)
@@ -932,14 +932,18 @@
// ui_weak_ptr_factory_ must be deleted on UI thread.
ui_weak_ptr_factory_.reset();
- // We should wait if there is any pending tasks posted to the worker
- // thread pool. on_io_completed_ won't be signaled iff |num_pending_tasks_|
- // is greater that 0.
- // We don't have to lock with |num_pending_tasks_lock_| here, since number of
- // pending tasks can only decrease at this point (Number of pending class can
- // be increased only on UI and IO thread. We are on UI thread, and there will
- // be no more tasks run on IO thread.
- on_io_completed_->Wait();
+ {
+ // http://crbug.com/125220
+ base::ThreadRestrictions::ScopedAllowWait allow_wait;
+ // We should wait if there is any pending tasks posted to the worker
+ // thread pool. on_io_completed_ won't be signaled iff |num_pending_tasks_|
+ // is greater that 0.
+ // We don't have to lock with |num_pending_tasks_lock_| here, since number
+ // of pending tasks can only decrease at this point (Number of pending class
+ // can be increased only on UI and IO thread. We are on UI thread, and there
+ // will be no more tasks run on IO thread.
+ on_io_completed_->Wait();
+ }
// Now that we are sure that there are no more pending tasks bound to this on
// other threads, we are safe to destroy the data members.
« no previous file with comments | « base/threading/thread_restrictions.h ('k') | dbus/bus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698