diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-15 21:43:21 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-15 21:43:21 +0000 |
commit | 9b9423cfaa6c65400634b6e86b41f1a524a2f8c4 (patch) | |
tree | 4b5069d604c53bfe87f89ecab3d5b519b16ace74 | |
parent | 2e90c7ab1cbdbd069e71dfc5b2a507bfecfb2aac (diff) | |
download | chromium_src-9b9423cfaa6c65400634b6e86b41f1a524a2f8c4.zip chromium_src-9b9423cfaa6c65400634b6e86b41f1a524a2f8c4.tar.gz chromium_src-9b9423cfaa6c65400634b6e86b41f1a524a2f8c4.tar.bz2 |
Fix IE crash while attempting to send the AutomationMsg_RunUnloadHandlers IPC on a NULL automation server.
Bug=49132
TBR=amit
Review URL: http://codereview.chromium.org/2868052
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52546 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome_frame/chrome_frame_automation.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/chrome_frame/chrome_frame_automation.cc b/chrome_frame/chrome_frame_automation.cc index 681f055..8909923 100644 --- a/chrome_frame/chrome_frame_automation.cc +++ b/chrome_frame/chrome_frame_automation.cc @@ -1235,9 +1235,15 @@ void ChromeFrameAutomationClient::RemoveBrowsingData(int remove_mask) { void ChromeFrameAutomationClient::RunUnloadHandlers(HWND notification_window, int notification_message) { - automation_server_->Send( - new AutomationMsg_RunUnloadHandlers(0, tab_handle_, notification_window, - notification_message)); + if (automation_server_) { + automation_server_->Send( + new AutomationMsg_RunUnloadHandlers(0, tab_handle_, + notification_window, + notification_message)); + } else { + // Post this message to ensure that the caller exits his message loop. + ::PostMessage(notification_window, notification_message, 0, 0); + } } ////////////////////////////////////////////////////////////////////////// |