diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-28 22:32:21 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-28 22:32:21 +0000 |
commit | 12636df0dcf36c769c8a5940d6a0c0b6b6a6647c (patch) | |
tree | 5ff7eccca7457afe24c47a277286c834108e825c /chrome/renderer/print_web_view_helper_win.cc | |
parent | ca3f22c070a6b61a3ec40ace07244890bbdd6ebe (diff) | |
download | chromium_src-12636df0dcf36c769c8a5940d6a0c0b6b6a6647c.zip chromium_src-12636df0dcf36c769c8a5940d6a0c0b6b6a6647c.tar.gz chromium_src-12636df0dcf36c769c8a5940d6a0c0b6b6a6647c.tar.bz2 |
Fix deadlock when plugin puts an alert and right afterwards the browser process makes a win32 call that ends up waiting on the plugin. Since the plugin thread is blocked, the Windows message doesn't get dispatched and the browser ui thread deadlocks. The message from the renderer would make the plugin run a nested message loop but it doesn't get run on the browser ui thread since it's blocked. The fix is to set the event that runs nested message loop in the renderer process.
BUG=23147
TEST=ui tests already cover nested message loops and plugins. This particular scenario is hard to write a test case for because it's a race condition involving the browser.
Review URL: http://codereview.chromium.org/243018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27421 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/print_web_view_helper_win.cc')
-rw-r--r-- | chrome/renderer/print_web_view_helper_win.cc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/chrome/renderer/print_web_view_helper_win.cc b/chrome/renderer/print_web_view_helper_win.cc index bed79f7..c5bf711 100644 --- a/chrome/renderer/print_web_view_helper_win.cc +++ b/chrome/renderer/print_web_view_helper_win.cc @@ -99,11 +99,8 @@ void PrintWebViewHelper::Print(WebFrame* frame, bool script_initiated) { params.has_selection = frame->hasSelection(); params.expected_pages_count = expected_pages_count; - msg = new ViewHostMsg_ScriptedPrint(params, - &print_settings); - msg->set_pump_messages_event(render_view_->modal_dialog_event()); - - if (Send(msg)) { + msg = new ViewHostMsg_ScriptedPrint(params, &print_settings); + if (render_view_->SendAndRunNestedMessageLoop(msg)) { msg = NULL; // If the settings are invalid, early quit. |