| Index: content/browser/renderer_host/render_view_host_impl.cc
|
| ===================================================================
|
| --- content/browser/renderer_host/render_view_host_impl.cc (revision 126158)
|
| +++ content/browser/renderer_host/render_view_host_impl.cc (working copy)
|
| @@ -41,7 +41,6 @@
|
| #include "content/public/browser/notification_details.h"
|
| #include "content/public/browser/notification_service.h"
|
| #include "content/public/browser/notification_types.h"
|
| -#include "content/public/browser/render_process_host.h"
|
| #include "content/public/browser/render_view_host_delegate.h"
|
| #include "content/public/browser/render_view_host_observer.h"
|
| #include "content/public/browser/user_metrics.h"
|
| @@ -419,12 +418,6 @@
|
| // Don't bother reporting hung state anymore.
|
| StopHangMonitorTimeout();
|
|
|
| - // If we are still waiting on the unload handler to be run, we consider
|
| - // the process hung and we should terminate it if there are no other tabs
|
| - // using the process. If there are other views using this process, the
|
| - // unresponsive renderer timeout will catch it.
|
| - bool hung = is_waiting_for_unload_ack_;
|
| -
|
| // Now that we're no longer the active RVH in the tab, start filtering out
|
| // most IPC messages. Usually the renderer will have stopped sending
|
| // messages as of OnSwapOutACK. However, we may have timed out waiting
|
| @@ -433,39 +426,6 @@
|
| // still allow synchronous messages through).
|
| SetSwappedOut(true);
|
|
|
| - // If we are not running the renderer in process and no other tab is using
|
| - // the hung process, kill it, assuming it is a real process (unit tests don't
|
| - // have real processes).
|
| - if (hung) {
|
| - base::ProcessHandle process_handle = GetProcess()->GetHandle();
|
| - int views = 0;
|
| -
|
| - // Count the number of listeners for the process, which is equivalent to
|
| - // views using the process as of this writing.
|
| - content::RenderProcessHost::listeners_iterator iter(
|
| - GetProcess()->ListenersIterator());
|
| - for (; !iter.IsAtEnd(); iter.Advance())
|
| - ++views;
|
| -
|
| - if (!content::RenderProcessHost::run_renderer_in_process() &&
|
| - process_handle && views <= 1) {
|
| - // We expect the delegate for this RVH to be TabContents, as it is the
|
| - // only class that swaps out render view hosts on navigation.
|
| - DCHECK(delegate_->GetRenderViewType() == content::VIEW_TYPE_TAB_CONTENTS);
|
| -
|
| - // Kill the process only if TabContents sets SuddenTerminationAllowed,
|
| - // which indicates that the timer has expired.
|
| - // This is not the case if we load data URLs or about:blank. The reason
|
| - // is that there is no network requests and this code is hit without
|
| - // setting the unresponsiveness timer. This allows a corner case where a
|
| - // navigation to a data URL will leave a process running, if the
|
| - // beforeunload handler completes fine, but the unload handler hangs.
|
| - // At this time, the complexity to solve this edge case is not worthwhile.
|
| - if (SuddenTerminationAllowed())
|
| - base::KillProcess(process_handle, content::RESULT_CODE_HUNG, false);
|
| - }
|
| - }
|
| -
|
| // Inform the renderer that it can exit if no one else is using it.
|
| Send(new ViewMsg_WasSwappedOut(GetRoutingID()));
|
| }
|
|
|