gecko-dev/xpcom/io
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
..
Base64.cpp
Base64.h
CocoaFileUtils.h
CocoaFileUtils.mm
FileDescriptorFile.cpp
FileDescriptorFile.h
FilePreferences.cpp Bug 1561912, r=michal 2019-07-26 22:58:39 +00:00
FilePreferences.h
FileUtilsWin.cpp
FileUtilsWin.h
InputStreamLengthHelper.cpp
InputStreamLengthHelper.h
InputStreamLengthWrapper.cpp
InputStreamLengthWrapper.h
NonBlockingAsyncInputStream.cpp
NonBlockingAsyncInputStream.h
SlicedInputStream.cpp
SlicedInputStream.h
SnappyCompressOutputStream.cpp
SnappyCompressOutputStream.h
SnappyFrameUtils.cpp
SnappyFrameUtils.h
SnappyUncompressInputStream.cpp
SnappyUncompressInputStream.h
SpecialSystemDirectory.cpp
SpecialSystemDirectory.h Bug 1163079 - ensure we fetch app/profile dir information on the main thread in GeckoChildProcessHost r=jld,bryce,haik 2019-09-04 12:04:52 +00:00
components.conf
crc32c.c
crc32c.h Bug 1562642 - add missing license in xpcom/ r=froydnj 2019-11-11 21:44:32 +00:00
moz.build
nsAnonymousTemporaryFile.cpp Bug 1575566 - stop using the directory service when creating anonymous temporary files, r=froydnj 2019-08-23 14:00:27 +00:00
nsAnonymousTemporaryFile.h
nsAppDirectoryServiceDefs.h Bug 1580282 - Remove checks for plugins that are part of extensions and support for loading plugins from the app and profile dir, r=mconley,mixedpuppy 2019-09-12 23:15:49 +00:00
nsAppFileLocationProvider.cpp Bug 1545123 - simplify how we get directory information for plugins, r=handyman,mconley 2019-11-02 22:33:42 +00:00
nsAppFileLocationProvider.h
nsBinaryStream.cpp Bug 1566595. Stop using [array] in nsIBinaryOutputStream. r=froydnj 2019-07-22 20:27:39 +00:00
nsBinaryStream.h Bug 1565627. Stop using [array] in nsIBinaryInputStream. r=froydnj 2019-07-16 18:39:16 +00:00
nsDirectoryService.cpp Bug 1163021 - add debug assert that directory service usage happens only on the main thread, r=froydnj 2019-09-13 16:08:48 +00:00
nsDirectoryService.h Bug 1163079 - ensure we fetch app/profile dir information on the main thread in GeckoChildProcessHost r=jld,bryce,haik 2019-09-04 12:04:52 +00:00
nsDirectoryServiceDefs.h
nsDirectoryServiceUtils.h
nsEscape.cpp
nsEscape.h
nsIAsyncInputStream.idl Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
nsIAsyncOutputStream.idl Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
nsIBinaryInputStream.idl Bug 1565627. Stop using [array] in nsIBinaryInputStream. r=froydnj 2019-07-16 18:39:16 +00:00
nsIBinaryOutputStream.idl Bug 1566595. Stop using [array] in nsIBinaryOutputStream. r=froydnj 2019-07-22 20:27:39 +00:00
nsICloneableInputStream.idl
nsIConverterInputStream.idl
nsIConverterOutputStream.idl
nsIDirectoryEnumerator.idl Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
nsIDirectoryService.idl Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
nsIFile.idl Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
nsIIOUtil.idl
nsIInputStream.idl Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
nsIInputStreamLength.idl
nsIInputStreamTee.idl Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
nsILineInputStream.idl Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
nsILocalFileMac.idl Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
nsILocalFileWin.idl Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
nsIMultiplexInputStream.idl
nsIOUtil.cpp
nsIOUtil.h
nsIObjectInputStream.idl Bug 1550860 - Mark implicit builtinclass interfaces explicitly. r=nika 2019-05-13 19:51:49 +00:00
nsIObjectOutputStream.idl Bug 1550860 - Mark implicit builtinclass interfaces explicitly. r=nika 2019-05-13 19:51:49 +00:00
nsIOutputStream.idl Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
nsIPipe.idl Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
nsISafeOutputStream.idl Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
nsIScriptableBase64Encoder.idl
nsIScriptableInputStream.idl Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
nsISeekableStream.idl Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
nsIStorageStream.idl Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
nsIStreamBufferAccess.idl Bug 1550860 - Mark implicit builtinclass interfaces explicitly. r=nika 2019-05-13 19:51:49 +00:00
nsIStringStream.idl Bug 1559403 - Implement nsIStringInputStream.setUTF8Data. r=froydnj 2019-06-14 15:48:41 +00:00
nsITellableStream.idl
nsIUnicharInputStream.idl Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
nsIUnicharLineInputStream.idl Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan 2019-05-22 22:37:14 +00:00
nsIUnicharOutputStream.idl
nsInputStreamTee.cpp
nsLinebreakConverter.cpp
nsLinebreakConverter.h
nsLocalFile.h
nsLocalFileCommon.cpp
nsLocalFileCommon.h
nsLocalFileUnix.cpp
nsLocalFileUnix.h
nsLocalFileWin.cpp Bug 1588975 - Replace ShellExecuteExW with mozilla::ShellExecuteByExplorer. r=aklotz,asuth 2019-11-14 19:47:29 +00:00
nsLocalFileWin.h
nsMultiplexInputStream.cpp Bug 1289211 - Rename InfallibleTArray to nsTArray in xpcom/ r=erahm 2019-07-10 03:33:59 +00:00
nsMultiplexInputStream.h
nsNativeCharsetUtils.cpp
nsNativeCharsetUtils.h
nsPipe.h
nsPipe3.cpp
nsScriptableBase64Encoder.cpp
nsScriptableBase64Encoder.h
nsScriptableInputStream.cpp
nsScriptableInputStream.h
nsSegmentedBuffer.cpp Bug 1584898 - Free nsPipe memory on a separate thread, r=Ehsan 2019-10-24 11:08:43 +00:00
nsSegmentedBuffer.h Bug 1584898 - Free nsPipe memory on a separate thread, r=Ehsan 2019-10-24 11:08:43 +00:00
nsStorageStream.cpp
nsStorageStream.h
nsStreamUtils.cpp Bug 1593560 - Only return false from NS_InputStreamIsBuffered if the underlying object doesn't implement ReadSegments. r=mayhemer 2019-11-06 22:37:07 +00:00
nsStreamUtils.h Bug 1551981. Add an nsTArray version of NS_ConsumeStream. r=froydnj 2019-05-15 18:29:28 +00:00
nsStringStream.cpp Bug 1559403 - Implement nsIStringInputStream.setUTF8Data. r=froydnj 2019-06-14 15:48:41 +00:00
nsStringStream.h Bug 1551962. Add a way to create an input stream from a moved nsTArray<uint8_t>. r=froydnj 2019-05-15 18:28:00 +00:00
nsUnicharInputStream.cpp
nsUnicharInputStream.h
nsWildCard.cpp
nsWildCard.h