Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: content/browser/renderer_host/render_widget_helper.cc

Issue 10065028: Fixing a problem, where a hung renderer process is not killed when navigating away (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/render_widget_helper.h" 5 #include "content/browser/renderer_host/render_widget_helper.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/eintr_wrapper.h" 9 #include "base/eintr_wrapper.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 if (render_process_id_ == -1) 94 if (render_process_id_ == -1)
95 return; 95 return;
96 96
97 BrowserThread::PostTask( 97 BrowserThread::PostTask(
98 BrowserThread::IO, FROM_HERE, 98 BrowserThread::IO, FROM_HERE,
99 base::Bind(&RenderWidgetHelper::OnCancelResourceRequests, 99 base::Bind(&RenderWidgetHelper::OnCancelResourceRequests,
100 this, 100 this,
101 render_widget_id)); 101 render_widget_id));
102 } 102 }
103 103
104 void RenderWidgetHelper::CrossSiteSwapOutACK( 104 void RenderWidgetHelper::SimulateSwapOutACK(
105 const ViewMsg_SwapOut_Params& params) { 105 const ViewMsg_SwapOut_Params& params) {
106 BrowserThread::PostTask( 106 BrowserThread::PostTask(
107 BrowserThread::IO, FROM_HERE, 107 BrowserThread::IO, FROM_HERE,
108 base::Bind(&RenderWidgetHelper::OnCrossSiteSwapOutACK, 108 base::Bind(&RenderWidgetHelper::OnSimulateSwapOutACK,
109 this, 109 this,
110 params)); 110 params));
111 } 111 }
112 112
113 bool RenderWidgetHelper::WaitForUpdateMsg(int render_widget_id, 113 bool RenderWidgetHelper::WaitForUpdateMsg(int render_widget_id,
114 const base::TimeDelta& max_delay, 114 const base::TimeDelta& max_delay,
115 IPC::Message* msg) { 115 IPC::Message* msg) {
116 base::TimeTicks time_start = base::TimeTicks::Now(); 116 base::TimeTicks time_start = base::TimeTicks::Now();
117 117
118 for (;;) { 118 for (;;) {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 if (host) 200 if (host)
201 host->OnMessageReceived(proxy->message()); 201 host->OnMessageReceived(proxy->message());
202 } 202 }
203 203
204 void RenderWidgetHelper::OnCancelResourceRequests( 204 void RenderWidgetHelper::OnCancelResourceRequests(
205 int render_widget_id) { 205 int render_widget_id) {
206 resource_dispatcher_host_->CancelRequestsForRoute( 206 resource_dispatcher_host_->CancelRequestsForRoute(
207 render_process_id_, render_widget_id); 207 render_process_id_, render_widget_id);
208 } 208 }
209 209
210 void RenderWidgetHelper::OnCrossSiteSwapOutACK( 210 void RenderWidgetHelper::OnSimulateSwapOutACK(
211 const ViewMsg_SwapOut_Params& params) { 211 const ViewMsg_SwapOut_Params& params) {
212 resource_dispatcher_host_->OnSwapOutACK(params); 212 resource_dispatcher_host_->OnSimulateSwapOutACK(params);
213 } 213 }
214 214
215 void RenderWidgetHelper::CreateNewWindow( 215 void RenderWidgetHelper::CreateNewWindow(
216 const ViewHostMsg_CreateWindow_Params& params, 216 const ViewHostMsg_CreateWindow_Params& params,
217 bool no_javascript_access, 217 bool no_javascript_access,
218 base::ProcessHandle render_process, 218 base::ProcessHandle render_process,
219 int* route_id, 219 int* route_id,
220 int* surface_id) { 220 int* surface_id) {
221 if (params.opener_suppressed || no_javascript_access) { 221 if (params.opener_suppressed || no_javascript_access) {
222 // If the opener is supppressed or script access is disallowed, we should 222 // If the opener is supppressed or script access is disallowed, we should
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 void RenderWidgetHelper::ClearAllocatedDIBs() { 356 void RenderWidgetHelper::ClearAllocatedDIBs() {
357 for (std::map<TransportDIB::Id, int>::iterator 357 for (std::map<TransportDIB::Id, int>::iterator
358 i = allocated_dibs_.begin(); i != allocated_dibs_.end(); ++i) { 358 i = allocated_dibs_.begin(); i != allocated_dibs_.end(); ++i) {
359 if (HANDLE_EINTR(close(i->second)) < 0) 359 if (HANDLE_EINTR(close(i->second)) < 0)
360 PLOG(ERROR) << "close: " << i->first; 360 PLOG(ERROR) << "close: " << i->first;
361 } 361 }
362 362
363 allocated_dibs_.clear(); 363 allocated_dibs_.clear();
364 } 364 }
365 #endif 365 #endif
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_helper.h ('k') | content/browser/renderer_host/render_widget_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698