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

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

Issue 10381073: Revert 132407 - Fixing a problem, where a hung renderer process is not killed when navigating away (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1130/src/
Patch Set: Created 8 years, 7 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/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 if (render_process_id_ == -1) 128 if (render_process_id_ == -1)
129 return; 129 return;
130 130
131 BrowserThread::PostTask( 131 BrowserThread::PostTask(
132 BrowserThread::IO, FROM_HERE, 132 BrowserThread::IO, FROM_HERE,
133 base::Bind(&RenderWidgetHelper::OnCancelResourceRequests, 133 base::Bind(&RenderWidgetHelper::OnCancelResourceRequests,
134 this, 134 this,
135 render_widget_id)); 135 render_widget_id));
136 } 136 }
137 137
138 void RenderWidgetHelper::SimulateSwapOutACK( 138 void RenderWidgetHelper::CrossSiteSwapOutACK(
139 const ViewMsg_SwapOut_Params& params) { 139 const ViewMsg_SwapOut_Params& params) {
140 BrowserThread::PostTask( 140 BrowserThread::PostTask(
141 BrowserThread::IO, FROM_HERE, 141 BrowserThread::IO, FROM_HERE,
142 base::Bind(&RenderWidgetHelper::OnSimulateSwapOutACK, 142 base::Bind(&RenderWidgetHelper::OnCrossSiteSwapOutACK,
143 this, 143 this,
144 params)); 144 params));
145 } 145 }
146 146
147 bool RenderWidgetHelper::WaitForBackingStoreMsg( 147 bool RenderWidgetHelper::WaitForBackingStoreMsg(
148 int render_widget_id, 148 int render_widget_id,
149 const base::TimeDelta& max_delay, 149 const base::TimeDelta& max_delay,
150 IPC::Message* msg) { 150 IPC::Message* msg) {
151 base::TimeTicks time_start = base::TimeTicks::Now(); 151 base::TimeTicks time_start = base::TimeTicks::Now();
152 152
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 if (host) 239 if (host)
240 host->OnMessageReceived(proxy->message()); 240 host->OnMessageReceived(proxy->message());
241 } 241 }
242 242
243 void RenderWidgetHelper::OnCancelResourceRequests( 243 void RenderWidgetHelper::OnCancelResourceRequests(
244 int render_widget_id) { 244 int render_widget_id) {
245 resource_dispatcher_host_->CancelRequestsForRoute( 245 resource_dispatcher_host_->CancelRequestsForRoute(
246 render_process_id_, render_widget_id); 246 render_process_id_, render_widget_id);
247 } 247 }
248 248
249 void RenderWidgetHelper::OnSimulateSwapOutACK( 249 void RenderWidgetHelper::OnCrossSiteSwapOutACK(
250 const ViewMsg_SwapOut_Params& params) { 250 const ViewMsg_SwapOut_Params& params) {
251 resource_dispatcher_host_->OnSimulateSwapOutACK(params); 251 resource_dispatcher_host_->OnSwapOutACK(params);
252 } 252 }
253 253
254 void RenderWidgetHelper::CreateNewWindow( 254 void RenderWidgetHelper::CreateNewWindow(
255 const ViewHostMsg_CreateWindow_Params& params, 255 const ViewHostMsg_CreateWindow_Params& params,
256 bool no_javascript_access, 256 bool no_javascript_access,
257 base::ProcessHandle render_process, 257 base::ProcessHandle render_process,
258 int* route_id, 258 int* route_id,
259 int* surface_id) { 259 int* surface_id) {
260 if (params.opener_suppressed || no_javascript_access) { 260 if (params.opener_suppressed || no_javascript_access) {
261 // If the opener is supppressed or script access is disallowed, we should 261 // If the opener is supppressed or script access is disallowed, we should
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 void RenderWidgetHelper::ClearAllocatedDIBs() { 395 void RenderWidgetHelper::ClearAllocatedDIBs() {
396 for (std::map<TransportDIB::Id, int>::iterator 396 for (std::map<TransportDIB::Id, int>::iterator
397 i = allocated_dibs_.begin(); i != allocated_dibs_.end(); ++i) { 397 i = allocated_dibs_.begin(); i != allocated_dibs_.end(); ++i) {
398 if (HANDLE_EINTR(close(i->second)) < 0) 398 if (HANDLE_EINTR(close(i->second)) < 0)
399 PLOG(ERROR) << "close: " << i->first; 399 PLOG(ERROR) << "close: " << i->first;
400 } 400 }
401 401
402 allocated_dibs_.clear(); 402 allocated_dibs_.clear();
403 } 403 }
404 #endif 404 #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