diff --git a/browser/components/shell/ShellService.sys.mjs b/browser/components/shell/ShellService.sys.mjs index 09f23a51670f3..c4af0be7de229 100644 --- a/browser/components/shell/ShellService.sys.mjs +++ b/browser/components/shell/ShellService.sys.mjs @@ -170,6 +170,7 @@ let ShellServiceInternal = { getDefaultPDFHandler() { const knownBrowserPrefixes = [ "AppXq0fevzme2pys62n3e0fbqa7peapykr8v", // Edge before Blink, per https://stackoverflow.com/a/32724723. + "AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723", // Another pre-Blink Edge identifier. See Bug 1858729. "Brave", // For "BraveFile". "Chrome", // For "ChromeHTML". "Firefox", // For "FirefoxHTML-*" or "FirefoxPDF-*". Need to take from other installations of Firefox! diff --git a/toolkit/mozapps/defaultagent/DefaultBrowser.cpp b/toolkit/mozapps/defaultagent/DefaultBrowser.cpp index 1edfeef300ceb..975af9beb2b1e 100644 --- a/toolkit/mozapps/defaultagent/DefaultBrowser.cpp +++ b/toolkit/mozapps/defaultagent/DefaultBrowser.cpp @@ -145,11 +145,16 @@ static BrowserResult GetDefaultBrowser() { // "AppX[hash]" as expected. It is unclear if the EdgeWithEdgeHTML and // EdgeWithBlink ProgIDs would differ if the latter is changed into a // package containing Edge. - constexpr std::wstring_view progIdEdgeHtml{ + constexpr std::wstring_view progIdEdgeHtml1{ L"AppXq0fevzme2pys62n3e0fbqa7peapykr8v"}; - - if (!wcsnicmp(registeredApp.get(), progIdEdgeHtml.data(), - progIdEdgeHtml.length())) { + // Apparently there is at least one other ProgID used by EdgeHTML Edge. + constexpr std::wstring_view progIdEdgeHtml2{ + L"AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723"}; + + if (!wcsnicmp(registeredApp.get(), progIdEdgeHtml1.data(), + progIdEdgeHtml1.length()) || + !wcsnicmp(registeredApp.get(), progIdEdgeHtml2.data(), + progIdEdgeHtml2.length())) { return Browser::EdgeWithEdgeHTML; } }