summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authormaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-23 21:23:06 +0000
committermaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-23 21:23:06 +0000
commitf3b25f5b9d0e780fbf74d990c356d65d8601ad74 (patch)
tree47753c5643b205b7f6914da088b5430fd16f20a1 /chrome
parent0bdc167735e5eac417a2c5ba9120abf613c6757f (diff)
downloadchromium_src-f3b25f5b9d0e780fbf74d990c356d65d8601ad74.zip
chromium_src-f3b25f5b9d0e780fbf74d990c356d65d8601ad74.tar.gz
chromium_src-f3b25f5b9d0e780fbf74d990c356d65d8601ad74.tar.bz2
Removed zombie hunter code
BUG=6468 Review URL: http://codereview.chromium.org/46076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12314 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/process_singleton.h3
-rw-r--r--chrome/browser/process_singleton_linux.cc6
-rw-r--r--chrome/browser/process_singleton_win.cc54
3 files changed, 0 insertions, 63 deletions
diff --git a/chrome/browser/process_singleton.h b/chrome/browser/process_singleton.h
index 1d6a1df..b5f3631 100644
--- a/chrome/browser/process_singleton.h
+++ b/chrome/browser/process_singleton.h
@@ -52,9 +52,6 @@ class ProcessSingleton {
locked_ = false;
}
- // Looks for zombie renderer and plugin processes that could have survived.
- void HuntForZombieChromeProcesses();
-
private:
bool locked_;
diff --git a/chrome/browser/process_singleton_linux.cc b/chrome/browser/process_singleton_linux.cc
index 2dd9bd1..6ae4596 100644
--- a/chrome/browser/process_singleton_linux.cc
+++ b/chrome/browser/process_singleton_linux.cc
@@ -55,12 +55,6 @@ void ProcessSingleton::Create() {
// http://code.google.com/p/chromium/issues/detail?id=8073
}
-void ProcessSingleton::HuntForZombieChromeProcesses() {
- // On Windows, this examines all the chrome.exe processes to see if one
- // is hung. TODO(port): should we do anything here?
- // http://code.google.com/p/chromium/issues/detail?id=8073
-}
-
void ProcessSingleton::SetupSocket(int* sock, struct sockaddr_un* addr) {
*sock = socket(PF_UNIX, SOCK_STREAM, 0);
if (*sock < 0)
diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc
index 190804f..af61e22 100644
--- a/chrome/browser/process_singleton_win.cc
+++ b/chrome/browser/process_singleton_win.cc
@@ -248,57 +248,3 @@ LRESULT CALLBACK ProcessSingleton::WndProc(HWND hwnd, UINT message,
return ::DefWindowProc(hwnd, message, wparam, lparam);
}
-
-void ProcessSingleton::HuntForZombieChromeProcesses() {
- // Detecting dead renderers is simple:
- // - The process is named chrome.exe.
- // - The process' parent doesn't exist anymore.
- // - The process doesn't have a chrome::kMessageWindowClass window.
- // If these conditions hold, the process is a zombie renderer or plugin.
-
- // Retrieve the list of browser processes on start. This list is then used to
- // detect zombie renderer process or plugin process.
- class ZombieDetector : public base::ProcessFilter {
- public:
- ZombieDetector() {
- for (HWND window = NULL;;) {
- window = FindWindowEx(HWND_MESSAGE,
- window,
- chrome::kMessageWindowClass,
- NULL);
- if (!window)
- break;
- DWORD process = 0;
- GetWindowThreadProcessId(window, &process);
- if (process)
- browsers_.push_back(process);
- }
- // We are also a browser, regardless of having the window or not.
- browsers_.push_back(::GetCurrentProcessId());
- }
-
- virtual bool Includes(uint32 pid, uint32 parent_pid) const {
- // Don't kill ourself eh.
- if (GetCurrentProcessId() == pid)
- return false;
-
- // Is this a browser? If so, ignore it.
- if (std::find(browsers_.begin(), browsers_.end(), pid) != browsers_.end())
- return false;
-
- // Is the parent a browser? If so, ignore it.
- if (std::find(browsers_.begin(), browsers_.end(), parent_pid)
- != browsers_.end())
- return false;
-
- // The chrome process is orphan.
- return true;
- }
-
- protected:
- std::vector<uint32> browsers_;
- };
-
- ZombieDetector zombie_detector;
- base::KillProcesses(L"chrome.exe", ResultCodes::HUNG, &zombie_detector);
-}