diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-19 01:31:31 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-19 01:31:31 +0000 |
commit | a5205b632e1c520ab58109ca36a1d4fdaa520478 (patch) | |
tree | ea91a2e932adee4dd28631e1d64e0184c3692a91 /chrome_frame/chrome_frame_automation.cc | |
parent | b09ee61ce290342d4aaff122a170e775dbc9d770 (diff) | |
download | chromium_src-a5205b632e1c520ab58109ca36a1d4fdaa520478.zip chromium_src-a5205b632e1c520ab58109ca36a1d4fdaa520478.tar.gz chromium_src-a5205b632e1c520ab58109ca36a1d4fdaa520478.tar.bz2 |
Fix the ChromeFrame new window popup test by ensuring that CreateExternalTabComplete executes on the IPC thread as before
and InitializeComplete executes as a task on the UI thread. The test failed because we receive IPCs for the new tab before
we have a tab proxy for it.
To fix the crash in bug http://code.google.com/p/chromium/issues/detail?id=44245, we set the automation_server_ member to NULL
after ReleaseAutomationServer returns. There are a number of races related to the automation server being released which
should hopefully go away if we remove dependency on the AutomationProxy object. Added a TODO to that effect in the code.
Bug=44245
Review URL: http://codereview.chromium.org/2079012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47612 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_automation.cc')
-rw-r--r-- | chrome_frame/chrome_frame_automation.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/chrome_frame/chrome_frame_automation.cc b/chrome_frame/chrome_frame_automation.cc index d4bca94..257e20b 100644 --- a/chrome_frame/chrome_frame_automation.cc +++ b/chrome_frame/chrome_frame_automation.cc @@ -832,8 +832,6 @@ void ChromeFrameAutomationClient::CreateExternalTabComplete(HWND chrome_window, tab_->AddObserver(this); tab_handle_ = tab_handle; } - - InitializeComplete(launch_result); } void ChromeFrameAutomationClient::SetEnableExtensionAutomation( @@ -1100,19 +1098,21 @@ void ChromeFrameAutomationClient::ReleaseAutomationServer() { // calling ReleaseAutomationServer. The reason we do this is that // we must cancel pending messages before we release the automation server. // Furthermore, while ReleaseAutomationServer is running, we could get - // a callback to LaunchComplete which is where we normally get our pointer - // to the automation server and there we check the server id for NULLness - // and do nothing if it is NULL. + // a callback to LaunchComplete which could cause an external tab to be + // created. Ideally the callbacks should be dropped. + // TODO(ananta) + // Refactor the ChromeFrameAutomationProxy code to not depend on + // AutomationProxy and simplify the whole mess. void* server_id = automation_server_id_; automation_server_id_ = NULL; if (automation_server_) { // Make sure to clean up any pending sync messages before we go away. automation_server_->CancelAsync(this); - automation_server_ = NULL; } proxy_factory_->ReleaseAutomationServer(server_id); + automation_server_ = NULL; // automation_server_ must not have been set to non NULL. // (if this regresses, start by looking at LaunchComplete()). |