ResourceLoadScheduler: DCHECK fails if a chosen request was canceled
In OnLifecycleStateChanged(), ShowConsoleMessageIfNeeded() is called and it chosen the top request from |pending_requests_| to show a console message if the request is stacked in the queue for a long time. This code expects the entry in |pending_requests_| is always alive even in the |pending_request_map_|, but it's wrong. If the request is canceled, it remains only in |pending_requests_| and DCHECK fires. This patch changes ShowConsoleMessageIfNeeded() to choose a request only when it is still alive in |oending_request_map_|. Bug: 936937 Change-Id: Ic0ea774f62719a3b36e78c49f24da3d5f6ce8365 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1498971Reviewed-by:Kinuko Yasuda <kinuko@chromium.org> Commit-Queue: Takashi Toyoshima <toyoshim@chromium.org> Cr-Commit-Position: refs/heads/master@{#637638}
Showing
Please register or sign in to comment