diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-26 21:05:07 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-26 21:05:07 +0000 |
commit | 7ea7ec4f52496cd65e8917b522df445bc9fd63f5 (patch) | |
tree | 8eb049be76839eff062b114c8f5a1980d6a94e7e | |
parent | a035748542ebe726b536a550cd0f77f765cee053 (diff) | |
download | chromium_src-7ea7ec4f52496cd65e8917b522df445bc9fd63f5.zip chromium_src-7ea7ec4f52496cd65e8917b522df445bc9fd63f5.tar.gz chromium_src-7ea7ec4f52496cd65e8917b522df445bc9fd63f5.tar.bz2 |
Fix fast shutdown
The check for unload handlers was backwards. This bug was introduced in r7901 <http://codereview.chromium.org/17453>.
Also, remove the call to process_.Close(). When we Terminate the process, we get a IPC channel error and BrowserRenderProcessHost::OnChannelError gets called. This method needs the handle so it can call DidProcessCrash. It also does the call to process_.Close() for us.
Review URL: http://codereview.chromium.org/42653
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12597 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/renderer_host/browser_render_process_host.cc | 1 | ||||
-rw-r--r-- | chrome/browser/renderer_host/render_view_host.cc | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc index c694fdd..e8bb8b7b 100644 --- a/chrome/browser/renderer_host/browser_render_process_host.cc +++ b/chrome/browser/renderer_host/browser_render_process_host.cc @@ -494,7 +494,6 @@ bool BrowserRenderProcessHost::FastShutdownIfPossible() { // Otherwise, we're allowed to just terminate the process. Using exit code 0 // means that UMA won't treat this as a renderer crash. process_.Terminate(ResultCodes::NORMAL_EXIT); - process_.Close(); return true; } diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc index e820f47..a8b7ad4 100644 --- a/chrome/browser/renderer_host/render_view_host.cc +++ b/chrome/browser/renderer_host/render_view_host.cc @@ -659,7 +659,7 @@ bool RenderViewHost::CanTerminate() const { if (!delegate_->CanTerminate()) return false; - return has_unload_listener_; + return !has_unload_listener_; } /////////////////////////////////////////////////////////////////////////////// |