Commit 7b99ede3 authored by Shakti Sahu's avatar Shakti Sahu Committed by Commit Bot

Fixed a crash in AutoResumptionHandler

This crash could possibly happen since we are clearing out the downloads
in OnDownloadRemoved rather than OnDownloadDestroyed. The destroyed is
a super set and is safer to use.

Bug:991621

Change-Id: Id90e8b259b36a3886ff16cd321363e25c81a6c06
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1742530Reviewed-by: default avatarShakti Sahu <shaktisahu@chromium.org>
Reviewed-by: default avatarMin Qin <qinmin@chromium.org>
Commit-Queue: Shakti Sahu <shaktisahu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#685232}
parent 0e65121b
...@@ -169,6 +169,7 @@ void AutoResumptionHandler::OnDownloadRemoved(download::DownloadItem* item) { ...@@ -169,6 +169,7 @@ void AutoResumptionHandler::OnDownloadRemoved(download::DownloadItem* item) {
} }
void AutoResumptionHandler::OnDownloadDestroyed(download::DownloadItem* item) { void AutoResumptionHandler::OnDownloadDestroyed(download::DownloadItem* item) {
resumable_downloads_.erase(item->GetGuid());
downloads_to_retry_.erase(item); downloads_to_retry_.erase(item);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment