summaryrefslogtreecommitdiffstats
path: root/chrome/browser/printing
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-14 00:40:00 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-14 00:40:00 +0000
commit7d038c3ed504066d9e39e3306281bb5dd047cfd2 (patch)
treedf768ce2f474305f0e6c7f99eb9a0458b8cd46bd /chrome/browser/printing
parentaa64c82121827c0943380f9c2c1063c1337af018 (diff)
downloadchromium_src-7d038c3ed504066d9e39e3306281bb5dd047cfd2.zip
chromium_src-7d038c3ed504066d9e39e3306281bb5dd047cfd2.tar.gz
chromium_src-7d038c3ed504066d9e39e3306281bb5dd047cfd2.tar.bz2
Reland r68893 after fixing allowing blocking IO on shutdown.
This time I just turned off the checking for Chrome/Windows because Chrome/Windows shutdown is a clusterf***. TODO(willchan): Give a shit about Windows, get a machine that runs Windows, debug Chrome shutdown on Windows, enable this ThreadRestrictions for Chrome/Windows. Consider PlatformThread::Join() to be blocking IO. Marks PlatformThread::Join() as blocking IO using ThreadRestrictions. Whitelists existing spots where we join on the UI/IO threads. Also noteworthy is I allow blocking IO on shutdown. BUG=65530, 66077, 66082 TEST=existing Review URL: http://codereview.chromium.org/5750003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69079 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/printing')
-rw-r--r--chrome/browser/printing/printer_query.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/printing/printer_query.cc b/chrome/browser/printing/printer_query.cc
index c28f400..7b73d86 100644
--- a/chrome/browser/printing/printer_query.cc
+++ b/chrome/browser/printing/printer_query.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/printing/printer_query.h"
#include "base/message_loop.h"
+#include "base/thread_restrictions.h"
#include "chrome/browser/printing/print_job_worker.h"
namespace printing {
@@ -96,6 +97,10 @@ void PrinterQuery::GetSettings(GetSettingsAskParam ask_user_for_settings,
void PrinterQuery::StopWorker() {
if (worker_.get()) {
+ // http://crbug.com/66082: We're blocking on the PrinterQuery's worker
+ // thread. It's not clear to me if this may result in blocking the current
+ // thread for an unacceptable time. We should probably fix it.
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
worker_->Stop();
worker_.reset();
}