Please explain somewhere (the comment at the start of this function, maybe) how this function can be invoked. I thought it was always invoked by gecko when the user clicked on a link. I don't know anything about how the download manager flow works, so this blob code is all new to me.