Bug 1405438 - Make sure the stub installer exit code is initialized before the user can exit it. r=agashlin

Also make sure the download phase time is initialized, so it will always be
correct in affected pings.

MozReview-Commit-ID: 3aLHbMiRUZl
This commit is contained in:
Matt Howell
2017-10-03 13:18:21 -07:00
parent 0d93a274d4
commit 61b8fc6ce5

View File

@@ -419,10 +419,13 @@ Function .onInit
; Initialize the majority of variables except those that need to be reset ; Initialize the majority of variables except those that need to be reset
; when a page is displayed. ; when a page is displayed.
StrCpy $ExitCode "${ERR_DOWNLOAD_CANCEL}"
StrCpy $IntroPhaseSeconds "0" StrCpy $IntroPhaseSeconds "0"
StrCpy $OptionsPhaseSeconds "0" StrCpy $OptionsPhaseSeconds "0"
StrCpy $EndPreInstallPhaseTickCount "0" StrCpy $EndPreInstallPhaseTickCount "0"
StrCpy $EndInstallPhaseTickCount "0" StrCpy $EndInstallPhaseTickCount "0"
StrCpy $StartDownloadPhaseTickCount "0"
StrCpy $EndDownloadPhaseTickCount "0"
StrCpy $InitialInstallRequirementsCode "" StrCpy $InitialInstallRequirementsCode ""
StrCpy $IsDownloadFinished "" StrCpy $IsDownloadFinished ""
StrCpy $FirefoxLaunchCode "0" StrCpy $FirefoxLaunchCode "0"
@@ -820,9 +823,7 @@ Function createInstall
StrCpy $DownloadRetryCount "0" StrCpy $DownloadRetryCount "0"
StrCpy $DownloadedBytes "0" StrCpy $DownloadedBytes "0"
StrCpy $StartLastDownloadTickCount "" StrCpy $StartLastDownloadTickCount ""
StrCpy $EndDownloadPhaseTickCount ""
StrCpy $DownloadFirstTransferSeconds "" StrCpy $DownloadFirstTransferSeconds ""
StrCpy $ExitCode "${ERR_DOWNLOAD_CANCEL}"
StrCpy $OpenedDownloadPage "0" StrCpy $OpenedDownloadPage "0"
ClearErrors ClearErrors
@@ -1171,7 +1172,6 @@ Function SendPing
; $EndFinishPhaseTickCount is used to determine how long the download was ; $EndFinishPhaseTickCount is used to determine how long the download was
; in progress. ; in progress.
${If} "$IsDownloadFinished" == "false" ${If} "$IsDownloadFinished" == "false"
${OrIf} "$EndDownloadPhaseTickCount" == ""
StrCpy $EndDownloadPhaseTickCount "$EndFinishPhaseTickCount" StrCpy $EndDownloadPhaseTickCount "$EndFinishPhaseTickCount"
; Cancel the download in progress ; Cancel the download in progress
InetBgDL::Get /RESET /END InetBgDL::Get /RESET /END