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/browser/chromeos | |
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/browser/chromeos')
-rw-r--r-- | chrome/browser/chromeos/main_menu.cc | 8 | ||||
-rw-r--r-- | chrome/browser/chromeos/main_menu.h | 3 |
2 files changed, 4 insertions, 7 deletions
diff --git a/chrome/browser/chromeos/main_menu.cc b/chrome/browser/chromeos/main_menu.cc index 5d57217..d801ceb 100644 --- a/chrome/browser/chromeos/main_menu.cc +++ b/chrome/browser/chromeos/main_menu.cc @@ -82,7 +82,7 @@ void MainMenu::ShowImpl() { GURL menu_url(kMenuURL); site_instance_ = SiteInstance::CreateSiteInstanceForURL(browser_->profile(), menu_url); - menu_rvh_ = new RenderViewHost(site_instance_, this, MSG_ROUTING_NONE, NULL); + menu_rvh_ = new RenderViewHost(site_instance_, this, MSG_ROUTING_NONE); rwhv_ = new RenderWidgetHostViewGtk(menu_rvh_); rwhv_->InitAsChild(); @@ -156,15 +156,13 @@ void MainMenu::RequestMove(const gfx::Rect& new_bounds) { rwhv_->SetSize(new_bounds.size()); } -void MainMenu::CreateNewWindow(int route_id, - base::WaitableEvent* modal_dialog_event) { +void MainMenu::CreateNewWindow(int route_id) { if (pending_contents_.get()) { NOTREACHED(); return; } - helper_.CreateNewWindow(route_id, modal_dialog_event, browser_->profile(), - site_instance_, + helper_.CreateNewWindow(route_id, browser_->profile(), site_instance_, DOMUIFactory::GetDOMUIType(GURL(kMenuURL)), NULL); pending_contents_.reset(helper_.GetCreatedWindow(route_id)); pending_contents_->set_delegate(&tab_contents_delegate_); diff --git a/chrome/browser/chromeos/main_menu.h b/chrome/browser/chromeos/main_menu.h index 0f4f257..85bf5689 100644 --- a/chrome/browser/chromeos/main_menu.h +++ b/chrome/browser/chromeos/main_menu.h @@ -117,8 +117,7 @@ class MainMenu : public RenderViewHostDelegate, virtual void RequestMove(const gfx::Rect& new_bounds); // RenderViewHostDelegate::View overrides. - virtual void CreateNewWindow(int route_id, - base::WaitableEvent* modal_dialog_event); + virtual void CreateNewWindow(int route_id); virtual void CreateNewWidget(int route_id, bool activatable) {} virtual void ShowCreatedWindow(int route_id, WindowOpenDisposition disposition, |