summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-07 20:54:53 +0000
committerjbauman@chromium.org <jbauman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-07 20:54:53 +0000
commit45aedebe1aca0904253d58bfdf91c13b3b53cbe4 (patch)
treefda57054f101166a29ea59bbdf860b1b52297da6
parenteabc1529cfd1ccc6fefbf9b77d058c9066dcffea (diff)
downloadchromium_src-45aedebe1aca0904253d58bfdf91c13b3b53cbe4.zip
chromium_src-45aedebe1aca0904253d58bfdf91c13b3b53cbe4.tar.gz
chromium_src-45aedebe1aca0904253d58bfdf91c13b3b53cbe4.tar.bz2
Use ForceShutdown to kill old GPU process.
This is cleaner and won't cause spurious crash reports. BUG= TEST= Review URL: http://codereview.chromium.org/8823005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113462 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/browser/gpu/gpu_process_host.cc8
-rw-r--r--content/browser/gpu/gpu_process_host.h2
2 files changed, 8 insertions, 2 deletions
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index 9f0d735..a0ec307 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -184,8 +184,7 @@ static bool HostIsValid(int host_id, GpuProcessHost* host) {
return true;
}
- host->Send(new GpuMsg_Crash());
- g_hosts_by_id.Pointer()->Remove(host_id);
+ host->ForceShutdown();
return false;
}
@@ -544,6 +543,11 @@ bool GpuProcessHost::software_rendering() {
return software_rendering_;
}
+void GpuProcessHost::ForceShutdown() {
+ g_hosts_by_id.Pointer()->Remove(host_id_);
+ BrowserChildProcessHost::ForceShutdown();
+}
+
bool GpuProcessHost::LaunchGpuProcess(const std::string& channel_id) {
if (!gpu_enabled_ || g_gpu_crash_count >= kGpuMaxCrashCount) {
SendOutstandingReplies();
diff --git a/content/browser/gpu/gpu_process_host.h b/content/browser/gpu/gpu_process_host.h
index 479ebae..9940b69 100644
--- a/content/browser/gpu/gpu_process_host.h
+++ b/content/browser/gpu/gpu_process_host.h
@@ -83,6 +83,8 @@ class GpuProcessHost : public BrowserChildProcessHost,
// Whether this GPU process is set up to use software rendering.
bool software_rendering();
+ void ForceShutdown();
+
private:
GpuProcessHost(int host_id);
virtual ~GpuProcessHost();