Bug 883855 - Add "delete" value support to AddHandlerValues and AddDDEHandlerValues. r=bbondy
authorMasatoshi Kimura <VYV03354@nifty.ne.jp>
Tue, 18 Jun 2013 23:02:53 +0900
changeset 135473 6d5f07b3a7670cef67004b8182a7231b2af5b650
parent 135472 6148ae44874e6ea97be9f4e95112a03dc7ffbea2
child 135474 8dcb029b9ca587d315419f2f907671ddb4c9620a
push id24841
push userryanvm@gmail.com
push dateTue, 18 Jun 2013 23:04:53 +0000
treeherdermozilla-central@d2a7cfa34154 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbbondy
bugs883855
milestone24.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 883855 - Add "delete" value support to AddHandlerValues and AddDDEHandlerValues. r=bbondy
toolkit/mozapps/installer/windows/nsis/common.nsh
--- a/toolkit/mozapps/installer/windows/nsis/common.nsh
+++ b/toolkit/mozapps/installer/windows/nsis/common.nsh
@@ -1148,16 +1148,18 @@
  * @param   _VALICON
  *          The path to the binary that contains the icon group for the default icon
  *          followed by a comma and either the icon group's resource index or the icon
  *          group's resource id prefixed with a minus sign
  * @param   _DISPNAME
  *          The display name for the handler. If emtpy no value will be set.
  * @param   _ISPROTOCOL
  *          Sets protocol handler specific registry values when "true".
+ *          Deletes protocol handler specific registry values when "delete".
+ *          Otherwise doesn't touch handler specific registry values.
  * @param   _ISDDE
  *          Sets DDE specific registry values when "true".
  *
  * $R3 = string value of the current registry key path.
  * $R4 = _KEY
  * $R5 = _VALOPEN
  * $R6 = _VALICON
  * $R7 = _DISPNAME
@@ -1189,16 +1191,18 @@
       ReadRegStr $R3 SHCTX "$R4" "FriendlyTypeName"
 
       StrCmp "$R3" "" +1 +3
       WriteRegStr SHCTX "$R4" "" "$R7"
       WriteRegStr SHCTX "$R4" "FriendlyTypeName" "$R7"
 
       StrCmp "$R8" "true" +1 +2
       WriteRegStr SHCTX "$R4" "URL Protocol" ""
+      StrCmp "$R8" "delete" +1 +2
+      DeleteRegValue SHCTX "$R4" "URL Protocol"
       StrCpy $R3 ""
       ReadRegDWord $R3 SHCTX "$R4" "EditFlags"
       StrCmp $R3 "" +1 +3  ; Only add EditFlags if a value doesn't exist
       DeleteRegValue SHCTX "$R4" "EditFlags"
       WriteRegDWord SHCTX "$R4" "EditFlags" 0x00000002
 
       StrCmp "$R6" "" +2 +1
       WriteRegStr SHCTX "$R4\DefaultIcon" "" "$R6"
@@ -1292,16 +1296,18 @@
  * @param   _VALICON
  *          The path to the binary that contains the icon group for the default icon
  *          followed by a comma and either the icon group's resource index or the icon
  *          group's resource id prefixed with a minus sign
  * @param   _DISPNAME
  *          The display name for the handler. If emtpy no value will be set.
  * @param   _ISPROTOCOL
  *          Sets protocol handler specific registry values when "true".
+ *          Deletes protocol handler specific registry values when "delete".
+ *          Otherwise doesn't touch handler specific registry values.
  * @param   _DDE_APPNAME
  *          Sets DDE specific registry values when not an empty string.
  *
  * $R0 = storage for SOFTWARE\Classes
  * $R1 = string value of the current registry key path.
  * $R2 = _KEY
  * $R3 = _VALOPEN
  * $R4 = _VALICON
@@ -1342,16 +1348,18 @@
       ReadRegStr $R1 SHCTX "$R2" "FriendlyTypeName"
 
       StrCmp "$R1" "" +1 +3
       WriteRegStr SHCTX "$R0\$R2" "" "$R5"
       WriteRegStr SHCTX "$R0\$R2" "FriendlyTypeName" "$R5"
 
       StrCmp "$R6" "true" +1 +2
       WriteRegStr SHCTX "$R0\$R2" "URL Protocol" ""
+      StrCmp "$R6" "delete" +1 +2
+      DeleteRegValue SHCTX "$R0\$R2" "URL Protocol"
       StrCpy $R1 ""
       ReadRegDWord $R1 SHCTX "$R0\$R2" "EditFlags"
       StrCmp $R1 "" +1 +3  ; Only add EditFlags if a value doesn't exist
       DeleteRegValue SHCTX "$R0\$R2" "EditFlags"
       WriteRegDWord SHCTX "$R0\$R2" "EditFlags" 0x00000002
 
       StrCmp "$R4" "" +2 +1
       WriteRegStr SHCTX "$R0\$R2\DefaultIcon" "" "$R4"