Speculative fix for a bug that happens during Chrome Frame teardown while...

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
parent 8d6f0dbc
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment