diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-07 00:55:25 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-07 00:55:25 +0000 |
commit | 6c2e45b826315fb4a3d452d589e245cdf2297991 (patch) | |
tree | 0442fcbdaaec0fc88345bc035f8c55c1403d36d8 /chrome/browser | |
parent | 2ee0e7564803f87b195d63c497a1101a2b29ab4f (diff) | |
download | chromium_src-6c2e45b826315fb4a3d452d589e245cdf2297991.zip chromium_src-6c2e45b826315fb4a3d452d589e245cdf2297991.tar.gz chromium_src-6c2e45b826315fb4a3d452d589e245cdf2297991.tar.bz2 |
Opening new chrome frame tabs would fail randomly. This was because of a race condition between processing the connect external
tab ack in chrome frame and receiving requests for the tab. As a result the new tabs would not render anything.
Fix is to resume the pending views in the OnReinitialize task in the ExternalTabContainer.
I also added a NOTREACHED when we fail to find the TabProxy for a tab handle in the chrome frame automation code to help
catch future instances of this issue.
Fixes bug http://code.google.com/p/chromium/issues/detail?id=43376
Bug=43376
Review URL: http://codereview.chromium.org/2011006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46643 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/external_tab_container.cc | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/chrome/browser/external_tab_container.cc b/chrome/browser/external_tab_container.cc index 0132be2..c0c537d 100644 --- a/chrome/browser/external_tab_container.cc +++ b/chrome/browser/external_tab_container.cc @@ -201,20 +201,8 @@ bool ExternalTabContainer::Reinitialize( automation_ = automation_provider; automation_resource_message_filter_ = filter; - - if (load_requests_via_automation_) { - InitializeAutomationRequestContext(tab_handle_); - - RenderViewHost* rvh = tab_contents_->render_view_host(); - if (rvh) { - AutomationResourceMessageFilter::ResumePendingRenderView( - rvh->process()->id(), rvh->routing_id(), - tab_handle_, automation_resource_message_filter_); - } - } - - // We cannot send the navigation state right away as the automation channel - // may not have been fully setup yet. + // Wait for the automation channel to be initialized before resuming pending + // render views and sending in the navigation state. MessageLoop::current()->PostTask( FROM_HERE, external_method_factory_.NewRunnableMethod( @@ -915,6 +903,17 @@ void ExternalTabContainer::LoadAccelerators() { } void ExternalTabContainer::OnReinitialize() { + if (load_requests_via_automation_) { + InitializeAutomationRequestContext(tab_handle_); + + RenderViewHost* rvh = tab_contents_->render_view_host(); + if (rvh) { + AutomationResourceMessageFilter::ResumePendingRenderView( + rvh->process()->id(), rvh->routing_id(), + tab_handle_, automation_resource_message_filter_); + } + } + NavigationStateChanged(tab_contents_, 0); ServicePendingOpenURLRequests(); } |