summaryrefslogtreecommitdiffstats
path: root/chrome_frame/chrome_frame_automation.cc
diff options
context:
space:
mode:
authorrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-20 14:20:25 +0000
committerrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-20 14:20:25 +0000
commit50f8a5a25236352442d1f5ae5407998dcd31e9ca (patch)
tree5158815e0973b7aaf1e89a6bdbfbb6b53f1aea56 /chrome_frame/chrome_frame_automation.cc
parent8d6f0dbc08cd8f6b629aae5cd93e4a46f1be1321 (diff)
downloadchromium_src-50f8a5a25236352442d1f5ae5407998dcd31e9ca.zip
chromium_src-50f8a5a25236352442d1f5ae5407998dcd31e9ca.tar.gz
chromium_src-50f8a5a25236352442d1f5ae5407998dcd31e9ca.tar.bz2
Speculative fix for a bug that happens during Chrome Frame teardown while there are pending IPC messages to be handled. Keep the ChromeFrameAutomationProxyImpl instance alive until all messages have been handled.
BUG=68869 TEST=No more crashes during handling of OnChannelError during teardown. Review URL: http://codereview.chromium.org/6250015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71951 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_automation.cc')
-rw-r--r--chrome_frame/chrome_frame_automation.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome_frame/chrome_frame_automation.cc b/chrome_frame/chrome_frame_automation.cc
index 2204486..2341575 100644
--- a/chrome_frame/chrome_frame_automation.cc
+++ b/chrome_frame/chrome_frame_automation.cc
@@ -398,11 +398,12 @@ void AutomationProxyCacheEntry::RemoveDelegate(LaunchDelegate* delegate,
if (snapshots_)
SendUMAData();
- // Take down the proxy since we no longer have any clients.
- proxy_.reset(NULL);
-
// Process pending notifications.
thread_->message_loop()->RunAllPending();
+
+ // Take down the proxy since we no longer have any clients.
+ // Make sure we only do this once all pending messages have been cleared.
+ proxy_.reset(NULL);
}
// Be careful to remove from the list after running pending
// tasks. Otherwise the delegate being removed might miss out