Fix crasher with download bar.
When dragging out a file, the download bar is shown and disappear automatically once the download is complete.
If the download item menu was opened at that point, we would crash.
This was because showing the menu runs an inner message loop that would process the hide for the download bar, leading to the download item that was on the call-stack to be deleted, causing a crasher once the stack-unwinded and the deleted object was accessed.

BUG=51187
TEST=In GMail, open an email with a large attachment (like 2 MB). Drag the file from GMail to your desktop. Click on the arrow on the item on the download bar to bring up the download menu. Keep the menu open until the download is completed and the bar gets hidden. It should not crash.

Review URL: http://codereview.chromium.org/3052043

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55430 0039d316-1c4b-4281-b951-d872f2087c98
2 files changed