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

Unified Diff: net/disk_cache/in_flight_io.cc

Issue 10151009: Disallow UI/IO thread blocking on any other thread. (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 | « net/disk_cache/backend_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/in_flight_io.cc
===================================================================
--- net/disk_cache/in_flight_io.cc (revision 133458)
+++ net/disk_cache/in_flight_io.cc (working copy)
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/location.h"
#include "base/logging.h"
+#include "base/threading/thread_restrictions.h"
namespace disk_cache {
@@ -82,7 +83,11 @@
// Runs on the primary thread.
void InFlightIO::InvokeCallback(BackgroundIO* operation, bool cancel_task) {
- operation->io_completed()->Wait();
+ {
+ // http://crbug.com/74623
+ base::ThreadRestrictions::ScopedAllowWait allow_wait;
+ operation->io_completed()->Wait();
+ }
running_ = true;
if (cancel_task)
« no previous file with comments | « net/disk_cache/backend_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698