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

Unified Diff: chrome/browser/printing/print_job_worker.cc

Issue 6541036: Take out incorrect usage of MessageLoop::SetNestableTasksAllowed. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/print_job_worker.cc
===================================================================
--- chrome/browser/printing/print_job_worker.cc (revision 75400)
+++ chrome/browser/printing/print_job_worker.cc (working copy)
@@ -80,7 +80,10 @@
// Recursive task processing is needed for the dialog in case it needs to be
// destroyed by a task.
- MessageLoop::current()->SetNestableTasksAllowed(true);
+ // TODO: this code is wrong, SetNestableTasksAllowed(true) is needed on the
+ // thread where the PrintDlgEx is called, and definitely both calls should
+ // happen on the same thread. See http://crbug.com/73466
+ // MessageLoop::current()->SetNestableTasksAllowed(true);
printing_context_->set_use_overlays(use_overlays);
M-A Ruel 2011/02/19 01:45:43 You want to move this to printing/printing_context
if (ask_user_for_settings) {
@@ -98,7 +101,9 @@
void PrintJobWorker::GetSettingsDone(PrintingContext::Result result) {
// Most PrintingContext functions may start a message loop and process
// message recursively, so disable recursive task processing.
- MessageLoop::current()->SetNestableTasksAllowed(false);
+ // TODO: see above comment. SetNestableTasksAllowed(false) needs to be called
+ // on the same thread as the previous call. See http://crbug.com/73466
+ // MessageLoop::current()->SetNestableTasksAllowed(false);
// We can't use OnFailure() here since owner_ may not support notifications.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698