Downloads handled by nsIExternalHelperAppService pass a null request to the final onStateChange notification, thus we need to hold a reference to the request earlier. This also allows unit tests to access the request while the download is running. MozReview-Commit-ID: 21rapDmMIZw