Bug 1763824 - Always add/update FirefoxPDF-* ProgID in Windows PostUpdate. r=mhowell,bhearsum

This was simply an oversight on my part: I didn't appreciate that
freshly introduced ProgIDs need to be added or updated unconditionally
in PostUpdate.

I've tested this by copying the fresh `helper.exe` into an existing
installation directory, running `uninstall\helper.exe /PostUpdate`
manually, verifying the expected ProgIDs exist in HKCR, and then
verifying that "Make default" within Firefox succeeds.

At some point we should do the same for `FirefoxHTML-*` and
`FirefoxURL-*`, but this patch should be uplifted to Beta 100 and I
don't want to introduce additional risk.

Differential Revision: https://phabricator.services.mozilla.com/D143661
This commit is contained in:
Nick Alexander 2022-04-14 21:12:39 +00:00
parent 7d2c51de76
commit c8e73b46a9

View File

@ -982,12 +982,13 @@ ${RemoveDefaultBrowserAgentShortcut}
${EndIf}
${EndIf}
${IsHandlerForInstallDir} "FirefoxPDF-$AppUserModelID" $R9
${If} "$R9" == "true"
${AddDisabledDDEHandlerValues} "FirefoxPDF-$AppUserModelID" "$2" "$8,${IDI_DOCUMENT_PDF_ZERO_BASED}" \
"${AppRegName} PDF Document" ""
; We've never supported bare "FirefoxPDF".
${EndIf}
; FirefoxPDF-* was added after FirefoxHTML and FirefoxURL, so we've never
; supported bare "FirefoxPDF". But we won't have it from the installer, so we
; add/update it unconditionally. `PostUpdate` is gated on `uninstall.log`
; being present, so the invocation here will only happen for installed
; directories, not unpackaged directories.
${AddDisabledDDEHandlerValues} "FirefoxPDF-$AppUserModelID" "$2" "$8,${IDI_DOCUMENT_PDF_ZERO_BASED}" \
"${AppRegName} PDF Document" ""
${IsHandlerForInstallDir} "FirefoxURL-$AppUserModelID" $R9
${If} "$R9" == "true"