Fix sequence checker asserts in CrxDownloader.
The code crashes because there is a race condition between the main sequence and another task runner when the instances of the CrxDownloader are destroyed. On the main sequence, the CrxDownloader is being used to download a file, then the reference to this instance is released. The CrxDownloader is using a task runner to run a blocking task, which validate the file it has just downloaded. This task runner receives a closure which holds a reference to the CrxDownloader. The reference is released after the task is run, and therefore, it results in a race when the dtor of CrxDownloader is being invoked. Besides removing the offending sequence checkers of the destructors of the CrxDownloader classes, this CL changes where the timer of the BackgroundDownloader is destroyed. The timer has sequence affinity and it must always be destroyed on the main sequence. Bug: 1105289,1105460 Change-Id: I78e002502ce6f5501c78d1e849f51b47bf3dc092 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2297696Reviewed-by:Joshua Pawlicki <waffles@chromium.org> Commit-Queue: Sorin Jianu <sorin@chromium.org> Cr-Commit-Position: refs/heads/master@{#788330}
Showing
Please register or sign in to comment