summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-05 18:49:39 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-05 18:49:39 +0000
commit53b9c0d8a7ddcfc0cce954ea081e667fc9678a68 (patch)
tree240a7ae866f2b42e9747e63f96e617e2122fb4cf /chrome
parent333590006f12dc30ef7e46187c8d62a3a401d695 (diff)
downloadchromium_src-53b9c0d8a7ddcfc0cce954ea081e667fc9678a68.zip
chromium_src-53b9c0d8a7ddcfc0cce954ea081e667fc9678a68.tar.gz
chromium_src-53b9c0d8a7ddcfc0cce954ea081e667fc9678a68.tar.bz2
Fix a Chrome crash which occured in a chrome frame reliability test run. The crash happens while
sending the AutomationMsg_GetCookiesFromHost request for a NULL channel. Fix is to use the AutomationResourceMessageFilter::Send method which checks for the same and also deletes the message if the channel is NULL. The AutomationResourceMessageFilter also implements the OnFilterRemoved notification on the IPC message filter to clear out the channel just in case. Fixes bug http://code.google.com/p/chromium/issues/detail?id=37512 Bug=37512 Review URL: http://codereview.chromium.org/668163 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40759 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/automation/automation_resource_message_filter.cc8
-rw-r--r--chrome/browser/automation/automation_resource_message_filter.h2
2 files changed, 8 insertions, 2 deletions
diff --git a/chrome/browser/automation/automation_resource_message_filter.cc b/chrome/browser/automation/automation_resource_message_filter.cc
index 90a4555..68fc346 100644
--- a/chrome/browser/automation/automation_resource_message_filter.cc
+++ b/chrome/browser/automation/automation_resource_message_filter.cc
@@ -43,6 +43,10 @@ void AutomationResourceMessageFilter::OnFilterAdded(IPC::Channel* channel) {
channel_ = channel;
}
+void AutomationResourceMessageFilter::OnFilterRemoved() {
+ channel_ = NULL;
+}
+
// Called on the IPC thread:
void AutomationResourceMessageFilter::OnChannelConnected(int32 peer_pid) {
}
@@ -329,8 +333,8 @@ void AutomationResourceMessageFilter::GetCookiesForUrl(
completion_callback_map_[completion_callback_id] = cookie_info;
- channel_->Send(new AutomationMsg_GetCookiesFromHost(0,
- tab_handle, url, completion_callback_id));
+ Send(new AutomationMsg_GetCookiesFromHost(0, tab_handle, url,
+ completion_callback_id));
}
void AutomationResourceMessageFilter::OnGetCookiesHostResponse(
diff --git a/chrome/browser/automation/automation_resource_message_filter.h b/chrome/browser/automation/automation_resource_message_filter.h
index df7eca1..55b9bf2 100644
--- a/chrome/browser/automation/automation_resource_message_filter.h
+++ b/chrome/browser/automation/automation_resource_message_filter.h
@@ -59,6 +59,8 @@ class AutomationResourceMessageFilter
// IPC::ChannelProxy::MessageFilter methods:
virtual void OnFilterAdded(IPC::Channel* channel);
+ virtual void OnFilterRemoved();
+
virtual void OnChannelConnected(int32 peer_pid);
virtual void OnChannelClosing();
virtual bool OnMessageReceived(const IPC::Message& message);