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

Unified Diff: chrome/browser/net/predictor.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 | « chrome/browser/metrics/metrics_service.cc ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/predictor.cc
===================================================================
--- chrome/browser/net/predictor.cc (revision 133458)
+++ chrome/browser/net/predictor.cc (working copy)
@@ -18,6 +18,7 @@
#include "base/string_util.h"
#include "base/stringprintf.h"
#include "base/synchronization/waitable_event.h"
+#include "base/threading/thread_restrictions.h"
#include "base/time.h"
#include "base/values.h"
#include "chrome/browser/io_thread.h"
@@ -768,8 +769,11 @@
// TODO(jar): Synchronous waiting for the IO thread is a potential source
// to deadlocks and should be investigated. See http://crbug.com/78451.
DCHECK(posted);
- if (posted)
+ if (posted) {
+ // http://crbug.com/124954
+ base::ThreadRestrictions::ScopedAllowWait allow_wait;
completion.Wait();
+ }
}
}
« no previous file with comments | « chrome/browser/metrics/metrics_service.cc ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698