From 72a1623f05cdfec636a5554baef322e32c3517bd Mon Sep 17 00:00:00 2001 From: "shess@chromium.org" Date: Mon, 13 Sep 2010 19:35:52 +0000 Subject: Revert "Make AutomationProvider fail fast on messages it doesn't understand." Original review: http://codereview.chromium.org/3224001 The mentioned bug involves a crash on chromebot on Mac. My working hypothesis, based on some of the log messages seen, is that some file descriptors are being trashed. The CL being reverted closes the channel while handling a message, which seems like it has potential to be a problem. Since this should not have user-facing impact, I am reverting the change for merging to the 517 branch, after which I will re-instate the change. We have been trying to verify that this change is in the crashing set, or out, but our data turned out to be incorrect, so I'm doing this in parallel with a new run. BUG=54453 TEST=chromebot Review URL: http://codereview.chromium.org/3317023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59260 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/automation/automation_provider.cc | 15 --------------- chrome/browser/automation/automation_provider.h | 2 -- 2 files changed, 17 deletions(-) diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index 361cdd2..6642a2a 100644 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -388,24 +388,9 @@ void AutomationProvider::OnMessageReceived(const IPC::Message& message) { IPC_MESSAGE_HANDLER_DELAY_REPLY(AutomationMsg_LoginWithUserAndPass, LoginWithUserAndPass) #endif // defined(OS_CHROMEOS) - - IPC_MESSAGE_UNHANDLED(OnUnhandledMessage()); IPC_END_MESSAGE_MAP() } -void AutomationProvider::OnUnhandledMessage() { - // We should not hang here. Print a message to indicate what's going on, - // and disconnect the channel to notify the caller about the error - // in a way it can't ignore, and make any further attempts to send - // messages fail fast. - LOG(ERROR) << "AutomationProvider received a message it can't handle. " - << "Please make sure that you use switches::kTestingChannelID " - << "for test code (TestingAutomationProvider), and " - << "switches::kAutomationClientChannelID for everything else " - << "(like ChromeFrame). Closing the automation channel."; - channel_->Close(); -} - // This task just adds another task to the event queue. This is useful if // you want to ensure that any tasks added to the event queue after this one // have already been processed by the time |task| is run. diff --git a/chrome/browser/automation/automation_provider.h b/chrome/browser/automation/automation_provider.h index 2ad6dea..82af88c 100644 --- a/chrome/browser/automation/automation_provider.h +++ b/chrome/browser/automation/automation_provider.h @@ -192,8 +192,6 @@ class AutomationProvider : public base::RefCounted, CancelableRequestConsumer consumer_; private: - void OnUnhandledMessage(); - // IPC Message callbacks. void WindowSimulateDrag(int handle, std::vector drag_path, -- cgit v1.1