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

Side by Side Diff: chrome/common/resource_dispatcher.cc

Issue 6237001: Merge 71182 - Fixed crash caused by ResourceDispatcher::OnReceivedRedirect() ... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/634/src/
Patch Set: Created 9 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
6 6
7 #include "chrome/common/resource_dispatcher.h" 7 #include "chrome/common/resource_dispatcher.h"
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 PendingRequestInfo* request_info = GetPendingRequestInfo(request_id); 395 PendingRequestInfo* request_info = GetPendingRequestInfo(request_id);
396 if (!request_info) 396 if (!request_info)
397 return; 397 return;
398 398
399 int32 routing_id = message.routing_id(); 399 int32 routing_id = message.routing_id();
400 bool has_new_first_party_for_cookies = false; 400 bool has_new_first_party_for_cookies = false;
401 GURL new_first_party_for_cookies; 401 GURL new_first_party_for_cookies;
402 if (request_info->peer->OnReceivedRedirect(new_url, info, 402 if (request_info->peer->OnReceivedRedirect(new_url, info,
403 &has_new_first_party_for_cookies, 403 &has_new_first_party_for_cookies,
404 &new_first_party_for_cookies)) { 404 &new_first_party_for_cookies)) {
405 // Double-check if the request is still around. The call above could
406 // potentially remove it.
407 request_info = GetPendingRequestInfo(request_id);
408 if (!request_info)
409 return;
405 request_info->pending_redirect_message.reset( 410 request_info->pending_redirect_message.reset(
406 new ViewHostMsg_FollowRedirect(routing_id, request_id, 411 new ViewHostMsg_FollowRedirect(routing_id, request_id,
407 has_new_first_party_for_cookies, 412 has_new_first_party_for_cookies,
408 new_first_party_for_cookies)); 413 new_first_party_for_cookies));
409 if (!request_info->is_deferred) { 414 if (!request_info->is_deferred) {
410 FollowPendingRedirect(request_id, *request_info); 415 FollowPendingRedirect(request_id, *request_info);
411 } 416 }
412 } else { 417 } else {
413 CancelPendingRequest(routing_id, request_id); 418 CancelPendingRequest(routing_id, request_id);
414 } 419 }
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 614
610 // static 615 // static
611 void ResourceDispatcher::ReleaseResourcesInMessageQueue(MessageQueue* queue) { 616 void ResourceDispatcher::ReleaseResourcesInMessageQueue(MessageQueue* queue) {
612 while (!queue->empty()) { 617 while (!queue->empty()) {
613 IPC::Message* message = queue->front(); 618 IPC::Message* message = queue->front();
614 ReleaseResourcesInDataMessage(*message); 619 ReleaseResourcesInDataMessage(*message);
615 queue->pop_front(); 620 queue->pop_front();
616 delete message; 621 delete message;
617 } 622 }
618 } 623 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698