content: Remove an implicit assumption of resource_dispatcher.cc.
commit030973d9ef9412b088945fdae5221eb28a9db043
authorerikchen <erikchen@chromium.org>
Thu, 10 Sep 2015 00:40:41 +0000 (9 17:40 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 10 Sep 2015 00:42:11 +0000 (10 00:42 +0000)
tree0399cabe139108129fa82a63df46cb4595cb2d40
parent60cb54f6837ab9b7f0377b36fa7e33cd076ba088
content: Remove an implicit assumption of resource_dispatcher.cc.

The implementation of ResourceDispatcher::OnMessageReceived() assumed that a
call to FlushDeferredMessages(request_id) would not invalidate the iterator
obtained from GetPendingRequestInfo(request_id). As far as I can tell, this
assumption relies on implicit behavior of consumers of ResourceDispatcher. I've
removed this assumption by adding a second call to
GetPendingRequestInfo(request_id) following the call to
FlushDeferredMessages(request_id).

BUG=527588

Review URL: https://codereview.chromium.org/1306283007

Cr-Commit-Position: refs/heads/master@{#348054}
content/child/resource_dispatcher.cc
content/child/resource_dispatcher.h