Index: chrome/browser/browser_main.cc |
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc |
index 92a3b68f85a3eeeff3bbf97376ec2eaf2e13a36b..dd1217d95cf930ac26440f0d85408224799a1732 100644 |
--- a/chrome/browser/browser_main.cc |
+++ b/chrome/browser/browser_main.cc |
@@ -27,6 +27,7 @@ |
#include "base/string_split.h" |
#include "base/string_util.h" |
#include "base/sys_string_conversions.h" |
+#include "base/thread_restrictions.h" |
#include "base/time.h" |
#include "base/trace_event.h" |
#include "base/utf_string_conversions.h" |
@@ -478,6 +479,14 @@ void HandleTestParameters(const CommandLine& command_line) { |
void RunUIMessageLoop(BrowserProcess* browser_process) { |
TRACE_EVENT_BEGIN("BrowserMain:MESSAGE_LOOP", 0, ""); |
+#if defined(OS_LINUX) |
+ // If the UI thread blocks, the whole UI is unresponsive. |
+ // Do not allow disk IO from the UI thread. |
+ // TODO(evanm): turn this on for all platforms. |
+ // http://code.google.com/p/chromium/issues/detail?id=60211 |
+ base::ThreadRestrictions::SetIOAllowed(false); |
+#endif |
+ |
#if defined(TOOLKIT_VIEWS) |
views::AcceleratorHandler accelerator_handler; |
MessageLoopForUI::current()->Run(&accelerator_handler); |