Bug 1485484 - Always fill in the optional third parameter to ApplicationID::Set. r=agashlin
authorMatt Howell <mhowell@mozilla.com>
Wed, 22 Aug 2018 20:38:12 +0000
changeset 488033 202f0986f4599698554946394d878597b7263484
parent 488032 e65592761f4cb4562a194cd2bc5c9c907e13f898
child 488034 8f1443ae9fe4cc6bf37b21e7f302816b9b481965
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersagashlin
bugs1485484
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1485484 - Always fill in the optional third parameter to ApplicationID::Set. r=agashlin In theory, the third parameter (dualMode) to the NSIS ApplicationID plugin's Set function is optional, but the plugin assumes that either it's there or there's nothing else on the NSIS stack, so it pops three items from the stack unconditionally. This means that supplying only two parameters results in one item silently being dropped from the NSIS stack. Fortunately this one function is the only place where we were doing that, so it only became a problem if there were an awful lot of shortcuts (around 7) to the same installation. Differential Revision: https://phabricator.services.mozilla.com/D4009
toolkit/mozapps/installer/windows/nsis/common.nsh
--- a/toolkit/mozapps/installer/windows/nsis/common.nsh
+++ b/toolkit/mozapps/installer/windows/nsis/common.nsh
@@ -7031,17 +7031,17 @@
               ${ExitDo}
             ${EndIf}
 
             ${If} ${FileExists} "$SMPROGRAMS\$R5"
               ShellLink::GetShortCutTarget "$SMPROGRAMS\$$R5"
               Pop $R4
               ${GetLongPath} "$R4" $R4
               ${If} "$R4" == "$R9" ; link path == install path
-                ApplicationID::Set "$SMPROGRAMS\$R5" "$R8"
+                ApplicationID::Set "$SMPROGRAMS\$R5" "$R8" "true"
                 Pop $R4
               ${EndIf}
             ${EndIf}
           ${Loop}
 
           ; Update the Quick Launch shortcuts' App ID for this application
           StrCpy $R2 -1
           ${Do}
@@ -7052,17 +7052,17 @@
               ${ExitDo}
             ${EndIf}
 
             ${If} ${FileExists} "$QUICKLAUNCH\$R5"
               ShellLink::GetShortCutTarget "$QUICKLAUNCH\$R5"
               Pop $R4
               ${GetLongPath} "$R4" $R4
               ${If} "$R4" == "$R9" ; link path == install path
-                ApplicationID::Set "$QUICKLAUNCH\$R5" "$R8"
+                ApplicationID::Set "$QUICKLAUNCH\$R5" "$R8" "true"
                 Pop $R4
               ${EndIf}
             ${EndIf}
           ${Loop}
 
           ; Update the Start Menu Programs shortcuts' App ID for this application
           ClearErrors
           ReadINIStr $R7 "$R6" "SMPROGRAMS" "RelativePathToDir"
@@ -7078,17 +7078,17 @@
                   ${ExitDo}
                 ${EndIf}
 
                 ${If} ${FileExists} "$R7\$R5"
                   ShellLink::GetShortCutTarget "$R7\$R5"
                   Pop $R4
                   ${GetLongPath} "$R4" $R4
                   ${If} "$R4" == "$R9" ; link path == install path
-                    ApplicationID::Set "$R7\$R5" "$R8"
+                    ApplicationID::Set "$R7\$R5" "$R8" "true"
                     Pop $R4
                   ${EndIf}
                 ${EndIf}
               ${Loop}
             ${EndUnless}
           ${EndUnless}
         ${EndIf}
 
@@ -7104,17 +7104,17 @@
 
         ; TaskBar links
         FindFirst $R6 $R5 "$R7\TaskBar\*.lnk"
         ${Do}
           ${If} ${FileExists} "$R7\TaskBar\$R5"
             ShellLink::GetShortCutTarget "$R7\TaskBar\$R5"
             Pop $R4
             ${If} "$R4" == "$R9" ; link path == install path
-              ApplicationID::Set "$R7\TaskBar\$R5" "$R8"
+              ApplicationID::Set "$R7\TaskBar\$R5" "$R8" "true"
               Pop $R4 ; pop Set result off the stack
               StrCpy $R3 "true"
             ${EndIf}
           ${EndIf}
           ClearErrors
           FindNext $R6 $R5
           ${If} ${Errors}
             ${ExitDo}
@@ -7124,17 +7124,17 @@
 
         ; Start menu links
         FindFirst $R6 $R5 "$R7\StartMenu\*.lnk"
         ${Do}
           ${If} ${FileExists} "$R7\StartMenu\$R5"
             ShellLink::GetShortCutTarget "$R7\StartMenu\$R5"
             Pop $R4
             ${If} "$R4" == "$R9" ; link path == install path
-              ApplicationID::Set "$R7\StartMenu\$R5" "$R8"
+              ApplicationID::Set "$R7\StartMenu\$R5" "$R8" "true"
               Pop $R4 ; pop Set result off the stack
               StrCpy $R3 "true"
             ${EndIf}
           ${EndIf}
           ClearErrors
           FindNext $R6 $R5
           ${If} ${Errors}
             ${ExitDo}