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

Unified Diff: chrome/browser/component_updater/background_downloader_win.cc

Issue 138973003: Race condition in component_updater::BackgroundDowloader (follow up) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/component_updater/background_downloader_win.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/component_updater/background_downloader_win.cc
diff --git a/chrome/browser/component_updater/background_downloader_win.cc b/chrome/browser/component_updater/background_downloader_win.cc
index 43db77a825399ce6a041e046fc332a42c772459e..c92320a073f2b3fcfe921a39374d8d12b72f9cd1 100644
--- a/chrome/browser/component_updater/background_downloader_win.cc
+++ b/chrome/browser/component_updater/background_downloader_win.cc
@@ -525,6 +525,8 @@ void BackgroundDownloader::EndDownload(HRESULT error) {
// Clean up stale jobs before invoking the callback.
CleanupStaleJobs(bits_manager_);
+ bits_manager_ = NULL;
+
Result result;
result.error = error;
result.response = response;
@@ -537,8 +539,6 @@ void BackgroundDownloader::EndDownload(HRESULT error) {
result,
download_metrics));
- bits_manager_ = NULL;
-
// Once the task is posted to the the UI thread, this object may be deleted
// by its owner. It is not safe to access members of this object on the
// FILE thread from this point on. The timer is stopped and all BITS
« no previous file with comments | « chrome/browser/component_updater/background_downloader_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698