New issue
Advanced search Search tips

Issue 900417 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 31
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Reentrance issue in DownloadManagerImpl::PostInitialization()

Project Member Reported by qin...@chromium.org, Oct 30

Issue description

DownloadManagerImpl::PostInitialization() is called twice, one by history db, one by download db.

If History db is initialized first, it will call OnHistoryQueryComplete() and set load_history_downloads_cb_. If download db is ready later, it calls PostInitialization() and which will call load_history_downloads_cb_ immediately. Since load_history_downloads_cb_ calls PostInitialization() again, we got an reentrance issue.


 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 31

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b52abae358a9f37b903cb8ca78402103f30b0261

commit b52abae358a9f37b903cb8ca78402103f30b0261
Author: Min Qin <qinmin@chromium.org>
Date: Wed Oct 31 21:58:36 2018

Fixed a reentrance issue in DownloadManagerImpl::PostInitialization().

DownloadManagerImpl::PostInitialization() is called twice, one by history db,
one by download db.
If History db is initialized first, it will call OnHistoryQueryComplete() and
set load_history_downloads_cb_. If download db is ready later, it calls
PostInitialization() and executes load_history_downloads_cb_ immediately.
Since load_history_downloads_cb_ calls PostInitialization() again, we got an reentrance
issue.

BUG= 900417 

Change-Id: Ie89146f9bd7d30ca955601c7288e0f33c2e9e11b
Reviewed-on: https://chromium-review.googlesource.com/c/1309218
Reviewed-by: Shakti Sahu <shaktisahu@chromium.org>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604386}
[modify] https://crrev.com/b52abae358a9f37b903cb8ca78402103f30b0261/content/browser/download/download_manager_impl.cc

Owner: qin...@chromium.org
Status: Fixed (was: Untriaged)

Sign in to add a comment