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

Unified Diff: chrome/browser/renderer_host/resource_dispatcher_host.cc

Issue 56016: Fix renderer hang caused when a synchronous XHR is disallowed for security... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/renderer_host/resource_dispatcher_host_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/resource_dispatcher_host.cc
===================================================================
--- chrome/browser/renderer_host/resource_dispatcher_host.cc (revision 12654)
+++ chrome/browser/renderer_host/resource_dispatcher_host.cc (working copy)
@@ -274,13 +274,21 @@
if (is_shutdown_ ||
!ShouldServiceRequest(process_type, process_id, request_data)) {
- // Tell the renderer that this request was disallowed.
- receiver_->Send(new ViewMsg_Resource_RequestComplete(
- route_id,
- request_id,
- URLRequestStatus(URLRequestStatus::FAILED, net::ERR_ABORTED),
- std::string())); // No security info needed, connection was not
- // established.
+ URLRequestStatus status(URLRequestStatus::FAILED, net::ERR_ABORTED);
+ if (sync_result) {
+ SyncLoadResult result;
+ result.status = status;
+ ViewHostMsg_SyncLoad::WriteReplyParams(sync_result, result);
+ receiver_->Send(sync_result);
+ } else {
+ // Tell the renderer that this request was disallowed.
+ receiver_->Send(new ViewMsg_Resource_RequestComplete(
+ route_id,
+ request_id,
+ status,
+ std::string())); // No security info needed, connection was not
+ // established.
+ }
return;
}
« no previous file with comments | « no previous file | chrome/browser/renderer_host/resource_dispatcher_host_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698