gecko-dev/uriloader
Toshihito Kikuchi 4d2777385a Bug 1588975 - Replace ShellExecuteExW with mozilla::ShellExecuteByExplorer. r=aklotz,asuth
The launcher process turns on the `PreferSystem32Images` mitigation policy for
the browser process.  Since the mitigation policy is inherited, a process launched
by the browser process also has `PreferSystem32Images`.  If an application which
does not support `PreferSystem32Images`, such as Skype for Business, is launched
via a hyperlink, a custom uri, or a downloaded file, it would fail to launch.

Bug 1567614 fixed this issue by introducing `mozilla::ShellExecuteByExplorer` to
`nsMIMEInfoWin::LoadUriInternal`.  This patch introduces
`mozilla::ShellExecuteByExplorer` to two more places.

1. xul!nsLocalFile::Launch
This is invoked when a user opens a file from the Download Library, or a user
opens a downloaded file with the default application without saving it.

2. xul!nsMIMEInfoWin::LaunchWithFile
This is invoked when a user opens a downloaded file with a custom application
(configured in about:preference) without saving it.

*Why does this patch change worker.js?*

The mochitest dom/tests/browser/browser_test_new_window_from_content.js failed
if it was executed after dom/serviceworkers/test/browser_download.js in the
same batch.  This was because browser_download.js launched Notepad to open
fake_download.bin.txt, preventing a new window from being opened in the
foreground in browser_test_new_window_from_content.js.

The test browser_download.js can verify downloaded data without opening an
associated application.  So this patch adds the content-type to the response
header in order not to open Notepad on Windows.

Differential Revision: https://phabricator.services.mozilla.com/D52567

--HG--
extra : moz-landing-system : lando
2019-11-14 19:47:29 +00:00
..
base Bug 1584479 - Part 1: Add flag for blocked social cookies in the content blocking log. r=Ehsan,droeh 2019-11-01 23:24:25 +00:00
docs Bug 1595601: Add documentation for the external handler service. r=Gijs 2019-11-12 19:45:26 +00:00
exthandler Bug 1588975 - Replace ShellExecuteExW with mozilla::ShellExecuteByExplorer. r=aklotz,asuth 2019-11-14 19:47:29 +00:00
prefetch Bug 1575934 - Create the channels used to download and verify appcache entries with the cookie settings belonging to the document which created the appcache; r=baku 2019-10-15 17:32:54 +00:00
moz.build Bug 1595601: Add documentation for the external handler service. r=Gijs 2019-11-12 19:45:26 +00:00