0

Merge 71182 - Fixed crash caused by ResourceDispatcher::OnReceivedRedirect() indirectly running a nested mesage loop in request_info->peer->OnReceivedRedirect() call. The loop might kill the instance of PendingRequestInfo what caused this crash. The fix simply checks for validity of PendingRequestInfo one more time within this OnReceivedRedirect() method.

BUG=chromium:65345, chromium-os:10721
TEST=sign up with gmail, try to switch account to another one - there should be no crash. see http://crosbug.com/10721 for more detailed repro steps

Review URL: http://codereview.chromium.org/6211005

TBR=zelidrag@chromium.org
Review URL: http://codereview.chromium.org/6237001

git-svn-id: svn://svn.chromium.org/chrome/branches/634/src@71216 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
oritm@chromium.org
2011-01-12 19:29:15 +00:00
parent 432173fe54
commit 11debbccb0

@@ -402,6 +402,11 @@ void ResourceDispatcher::OnReceivedRedirect(
if (request_info->peer->OnReceivedRedirect(new_url, info,
&has_new_first_party_for_cookies,
&new_first_party_for_cookies)) {
// Double-check if the request is still around. The call above could
// potentially remove it.
request_info = GetPendingRequestInfo(request_id);
if (!request_info)
return;
request_info->pending_redirect_message.reset(
new ViewHostMsg_FollowRedirect(routing_id, request_id,
has_new_first_party_for_cookies,