Commit 45aedebe authored by jbauman@chromium.org's avatar jbauman@chromium.org

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
parent eabc1529
......@@ -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();
......
......@@ -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();
......
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