gecko-dev/ipc/glue
Jed Davis 4737104967 Bug 1440103 - Fix handle leak in IPC process launching. r=handyman
We use the process handle returned from `CreateProcess` to derive
another handle with more permissions, but the original handle is never
closed.  This bug appears to be fairly old: it existed before this code
was converted to use MozPromise.

Currently we provide the original handle to external consumers of the
launch promise; this patch resolves the promise with the privileged
handle instead and closes the original one.  (One consumer uses the
handle only to obtain the pid, and the rest don't use it at all, so this
shouldn't change anything.)

As a related cleanup, `ProcessLaunchPromise` is now exclusive (because
it's resolved with resources which are consumed) and no longer declared
in the header file (because it's used only internally).

Differential Revision: https://phabricator.services.mozilla.com/D119820
2021-07-15 22:20:34 +00:00
..
AutoTransportDescriptor.cpp Bug 1706374 - Part 7: Add owning helpers for working with transport descriptors, r=handyman 2021-06-22 18:17:20 +00:00
AutoTransportDescriptor.h Bug 1706374 - Part 7: Add owning helpers for working with transport descriptors, r=handyman 2021-06-22 18:17:20 +00:00
BackgroundChild.h
BackgroundChildImpl.cpp Bug 1645528 - Connect nsRefreshDrivers in content processes with a widget-local vsync source r=mattwoodrow,emilio 2020-12-02 09:47:53 +00:00
BackgroundChildImpl.h Bug 1669437 - Add necessary infrastructure for independent in-memory only local storage database; r=asuth,dom-workers-and-storage-reviewers 2020-11-11 13:12:57 +00:00
BackgroundImpl.cpp Bug 1683490 - Make PBackground be a refcounted actor, r=asuth 2021-01-21 16:26:50 +00:00
BackgroundParent.h Bug 1660470 - Add missing include directives/forward declarations. r=nika 2020-11-23 16:21:38 +00:00
BackgroundParentImpl.cpp Bug 1496997 - Remove a chunk of child intercept code from dom/serviceworkers r=asuth,dom-workers-and-storage-reviewers,sg 2021-06-08 21:02:54 +00:00
BackgroundParentImpl.h Bug 1496997 - Remove a chunk of child intercept code from dom/serviceworkers r=asuth,dom-workers-and-storage-reviewers,sg 2021-06-08 21:02:54 +00:00
BackgroundUtils.cpp Bug 1715167 - Part 6: Use the unsandboxed result principal as precursor for sandbox principals, r=ckerschb,ngogge 2021-07-15 21:09:15 +00:00
BackgroundUtils.h Bug 1678062 - Remove unnecessary includes. r=andi 2020-11-23 16:12:02 +00:00
BrowserProcessSubThread.cpp Bug 1706374 - Part 12a: Initialize NodeController when creating IO thread, r=handyman 2021-06-22 18:17:22 +00:00
BrowserProcessSubThread.h Bug 1656101 - Delete some IPC dead code (BrowserProcessSubThread types and an unused header). r=mccr8 2020-07-29 23:31:38 +00:00
ByteBuf.h
ByteBufUtils.h Bug 1693661 - Use mozalloc_handle_oom instead of failing gracefully if we fail to allocate. r=jld 2021-02-25 18:53:25 +00:00
CrashReporterClient.cpp
CrashReporterClient.h Bug 1706375 - Support building ipc/glue in non-unified mode, r=ipc-reviewers,mccr8 2021-04-22 14:32:03 +00:00
CrashReporterHelper.h Bug 1660470 - Add missing include directives/forward declarations. r=nika 2020-11-23 16:21:38 +00:00
CrashReporterHost.cpp Bug 1706375 - Support building ipc/glue in non-unified mode, r=ipc-reviewers,mccr8 2021-04-22 14:32:03 +00:00
CrashReporterHost.h Bug 1715144 - Part 1: Stop adding /ipc/glue to LOCAL_INCLUDES when including chromium-config.mozbuild, r=ipc-reviewers,necko-reviewers,mccr8,valentin 2021-06-09 04:56:48 +00:00
CrossProcessMutex.h Bug 1715144 - Part 1: Stop adding /ipc/glue to LOCAL_INCLUDES when including chromium-config.mozbuild, r=ipc-reviewers,necko-reviewers,mccr8,valentin 2021-06-09 04:56:48 +00:00
CrossProcessMutex_posix.cpp
CrossProcessMutex_unimplemented.cpp
CrossProcessMutex_windows.cpp
CrossProcessSemaphore.h Bug 1715144 - Part 1: Stop adding /ipc/glue to LOCAL_INCLUDES when including chromium-config.mozbuild, r=ipc-reviewers,necko-reviewers,mccr8,valentin 2021-06-09 04:56:48 +00:00
CrossProcessSemaphore_posix.cpp
CrossProcessSemaphore_unimplemented.cpp
CrossProcessSemaphore_windows.cpp
Endpoint.h Bug 1713148 - Part 3: Use ports for Endpoint-created actors, r=handyman 2021-06-22 18:17:25 +00:00
EnumSerializer.h Bug 1689415 - Avoid UB when validating enum values in EnumSerializer. r=mccr8 2021-02-02 18:04:05 +00:00
EnvironmentMap.h
FileDescriptor.cpp Bug 1706375 - Support building ipc/glue in non-unified mode, r=ipc-reviewers,mccr8 2021-04-22 14:32:03 +00:00
FileDescriptor.h Bug 1660470 - Move IPDLParamTraits for FileDescriptor out of FileDescriptor.h. r=nika 2020-11-23 16:04:55 +00:00
FileDescriptorSetChild.cpp Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj 2020-08-04 11:27:07 +00:00
FileDescriptorSetChild.h
FileDescriptorSetParent.cpp Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj 2020-08-04 11:27:07 +00:00
FileDescriptorSetParent.h
FileDescriptorShuffle.cpp
FileDescriptorShuffle.h
FileDescriptorUtils.cpp
FileDescriptorUtils.h
ForkServer.cpp Bug 1706375 - Support building ipc/glue in non-unified mode, r=ipc-reviewers,mccr8 2021-04-22 14:32:03 +00:00
ForkServer.h
ForkServiceChild.cpp Bug 1706375 - Support building ipc/glue in non-unified mode, r=ipc-reviewers,mccr8 2021-04-22 14:32:03 +00:00
ForkServiceChild.h Bug 1706375 - Support building ipc/glue in non-unified mode, r=ipc-reviewers,mccr8 2021-04-22 14:32:03 +00:00
GeckoChildProcessHost.cpp Bug 1440103 - Fix handle leak in IPC process launching. r=handyman 2021-07-15 22:20:34 +00:00
GeckoChildProcessHost.h Bug 1440103 - Fix handle leak in IPC process launching. r=handyman 2021-07-15 22:20:34 +00:00
IOThreadChild.h Bug 1706374 - Part 12a: Initialize NodeController when creating IO thread, r=handyman 2021-06-22 18:17:22 +00:00
IPCCore.h Bug 1660470 - Move void_t/null_t to a new IPCCore.h header. r=nika 2020-11-23 16:05:20 +00:00
IPCMessageUtils.cpp Bug 1715144 - Part 1: Stop adding /ipc/glue to LOCAL_INCLUDES when including chromium-config.mozbuild, r=ipc-reviewers,necko-reviewers,mccr8,valentin 2021-06-09 04:56:48 +00:00
IPCMessageUtils.h Bug 1677466 - Move ParamTraits specializations with extra dependencies out of IPCMessageUtils.h. r=mccr8 2020-12-10 11:09:21 +00:00
IPCMessageUtilsSpecializations.cpp Bug 1704658: Implement ParamTraits for RefPtr<nsAtom> r=nika 2021-04-27 08:20:18 +00:00
IPCMessageUtilsSpecializations.h Bug 1666222: Rip fuzzyfox out of the timestamp classes 2/5 r=smaug 2021-07-14 18:18:16 +00:00
IPCStream.ipdlh
IPCStreamAlloc.h
IPCStreamChild.cpp Bug 1706375 - Support building ipc/glue in non-unified mode, r=ipc-reviewers,mccr8 2021-04-22 14:32:03 +00:00
IPCStreamDestination.cpp Bug 1681529 - Part 3: Apply InputStreamLengthWrapper after DelayedStartInputStream, r=baku 2021-02-04 18:12:57 +00:00
IPCStreamDestination.h Bug 1681529 - Part 3: Apply InputStreamLengthWrapper after DelayedStartInputStream, r=baku 2021-02-04 18:12:57 +00:00
IPCStreamParent.cpp
IPCStreamSource.cpp Bug 1706375 - Support building ipc/glue in non-unified mode, r=ipc-reviewers,mccr8 2021-04-22 14:32:03 +00:00
IPCStreamSource.h Bug 1706375 - Support building ipc/glue in non-unified mode, r=ipc-reviewers,mccr8 2021-04-22 14:32:03 +00:00
IPCStreamUtils.cpp Bug 1681529 - Part 5: Serialize `nsIInputStream` over IPC with aDelayedStart by default, r=baku 2021-02-04 18:13:07 +00:00
IPCStreamUtils.h Bug 1681529 - Part 5: Serialize `nsIInputStream` over IPC with aDelayedStart by default, r=baku 2021-02-04 18:13:07 +00:00
IPCTypes.h Bug 1660470 - Avoid including IPCMessageUtils.h from header files. r=nika 2020-11-23 16:03:47 +00:00
IPDLParamTraits.h
IdleSchedulerChild.cpp Bug 1718415 - GetMainThreadIdleScheduler checks if scheduler is destroyed r=smaug 2021-07-07 23:43:01 +00:00
IdleSchedulerChild.h Bug 1718415 - GetMainThreadIdleScheduler checks if scheduler is destroyed r=smaug 2021-07-07 23:43:01 +00:00
IdleSchedulerParent.cpp Bug 1710989 - Apply linter fixes in IdleScheduler code r=smaug DONTBUILD 2021-05-19 02:30:24 +00:00
IdleSchedulerParent.h Bug 1629064 - pt 10. Add telemetry r=smaug 2021-05-12 06:46:11 +00:00
InputStreamParams.ipdlh Bug 1660470 - Move void_t/null_t to a new IPCCore.h header. r=nika 2020-11-23 16:05:20 +00:00
InputStreamUtils.cpp Bug 1706375 - Support building ipc/glue in non-unified mode, r=ipc-reviewers,mccr8 2021-04-22 14:32:03 +00:00
InputStreamUtils.h
LibrarySandboxPreload.cpp Bug 1700534 - Coalesce RLBox wasmboxed libraries. r=firefox-build-system-reviewers,shravanrn,bholley,andi,mhentges 2021-06-22 05:31:33 +00:00
LibrarySandboxPreload.h Bug 1700534 - Coalesce RLBox wasmboxed libraries. r=firefox-build-system-reviewers,shravanrn,bholley,andi,mhentges 2021-06-22 05:31:33 +00:00
MessageChannel.cpp Bug 1718333 - Remove unnecessary AssertLinkThread assertions, r=handyman 2021-07-15 21:09:55 +00:00
MessageChannel.h Bug 1718333 - Remove unnecessary AssertLinkThread assertions, r=handyman 2021-07-15 21:09:55 +00:00
MessageLink.cpp Bug 1717728 - Hold MessageChannel's monitor when creating PortLink, r=handyman 2021-07-12 20:36:20 +00:00
MessageLink.h Bug 1713148 - Part 5: Remove ThreadLink, r=handyman 2021-06-22 18:17:25 +00:00
MessagePump.cpp Bug 1706375 - Support building ipc/glue in non-unified mode, r=ipc-reviewers,mccr8 2021-04-22 14:32:03 +00:00
MessagePump.h
MiniTransceiver.cpp Bug 1706375 - Support building ipc/glue in non-unified mode, r=ipc-reviewers,mccr8 2021-04-22 14:32:03 +00:00
MiniTransceiver.h
Neutering.h Bug 1519636 - Reformat recent changes to the Google coding style r=andi 2020-08-02 15:29:15 +00:00
NodeChannel.cpp Bug 1706374 - Part 13: Remove the event footer from an IPC::Message when deserializing, r=handyman,glandium 2021-06-22 18:17:23 +00:00
NodeChannel.h Bug 1717993 - Hold a WeakPtr to mExistingListener in NodeChannel, r=handyman 2021-06-25 21:30:49 +00:00
NodeController.cpp Bug 1713148 - Part 2: Support port attachments on IPC messages, r=handyman 2021-06-22 18:17:24 +00:00
NodeController.h Bug 1706374 - Part 11: Add NodeController component bridging IPC and Ports, r=handyman 2021-06-22 18:17:22 +00:00
PBackground.ipdl Bug 1710004 - Part 2: Make it possible to pre load data into BackgroundSessionStorageManager. r=asuth 2021-06-08 13:42:33 +00:00
PBackgroundSharedTypes.ipdlh Bug 1689147 - Part 5: Change comparable to an extended attribute, r=mccr8 2021-02-09 16:50:23 +00:00
PBackgroundTest.ipdl
PChildToParentStream.ipdl
PFileDescriptorSet.ipdl
PIdleScheduler.ipdl Bug 1629064 - pt 1. Add IdleScheduler messages for GC r=smaug 2021-05-12 06:46:08 +00:00
PParentToChildStream.ipdl
ProcessChild.cpp
ProcessChild.h
ProcessUtils.h Bug 1715144 - Part 1: Stop adding /ipc/glue to LOCAL_INCLUDES when including chromium-config.mozbuild, r=ipc-reviewers,necko-reviewers,mccr8,valentin 2021-06-09 04:56:48 +00:00
ProcessUtils_bsd.cpp
ProcessUtils_common.cpp Bug 1698045 part 1 - Add xpc::SelfHostedShmem to hold shared memory for JS initialization. r=smaug,tcampbell,ipc-reviewers,jld 2021-05-12 13:57:55 +00:00
ProcessUtils_linux.cpp
ProcessUtils_mac.mm Bug 1682030 - Remove some dead NPAPI code from dom/plugins and related spots. r=jmathies,mconley,ipc-reviewers,mccr8 2021-04-06 19:28:12 +00:00
ProcessUtils_none.cpp
ProtocolMessageUtils.h Bug 1713148 - Part 3: Use ports for Endpoint-created actors, r=handyman 2021-06-22 18:17:25 +00:00
ProtocolTypes.ipdlh
ProtocolUtils.cpp Bug 1713148 - Part 4: Remove ProcessLink, r=handyman 2021-06-22 18:17:25 +00:00
ProtocolUtils.h Bug 1713148 - Part 4: Remove ProcessLink, r=handyman 2021-06-22 18:17:25 +00:00
ProtocolUtilsFwd.h Bug 1660470 - Avoid including ProtocolUtils.h from header files. r=nika 2020-11-23 16:05:07 +00:00
ScopedPort.cpp Bug 1713148 - Part 2: Support port attachments on IPC messages, r=handyman 2021-06-22 18:17:24 +00:00
ScopedPort.h Bug 1713148 - Part 2: Support port attachments on IPC messages, r=handyman 2021-06-22 18:17:24 +00:00
ScopedXREEmbed.cpp
ScopedXREEmbed.h
SerializedStructuredCloneBuffer.h Bug 1677466 - Move ParamTraits specializations with extra dependencies out of IPCMessageUtils.h. r=mccr8 2020-12-10 11:09:21 +00:00
SharedMemory.cpp
SharedMemory.h Bug 1699224 - Part 2. Expose SharedMemoryBasic::Unmap for use by callers. r=jld 2021-03-29 22:43:27 +00:00
SharedMemoryBasic.h
SharedMemoryBasic_android.cpp
SharedMemoryBasic_android.h Bug 1715144 - Part 1: Stop adding /ipc/glue to LOCAL_INCLUDES when including chromium-config.mozbuild, r=ipc-reviewers,necko-reviewers,mccr8,valentin 2021-06-09 04:56:48 +00:00
SharedMemoryBasic_chromium.h Bug 1715144 - Part 1: Stop adding /ipc/glue to LOCAL_INCLUDES when including chromium-config.mozbuild, r=ipc-reviewers,necko-reviewers,mccr8,valentin 2021-06-09 04:56:48 +00:00
SharedMemoryBasic_mach.h Bug 1715144 - Part 1: Stop adding /ipc/glue to LOCAL_INCLUDES when including chromium-config.mozbuild, r=ipc-reviewers,necko-reviewers,mccr8,valentin 2021-06-09 04:56:48 +00:00
SharedMemoryBasic_mach.mm
SharedMemory_posix.cpp Bug 1519636 - Reformat recent changes to the Google coding style r=andi 2021-01-06 17:17:23 +00:00
SharedMemory_windows.cpp
Shmem.cpp Bug 1660470 - Split ShmemMessageUtils.h from Shmem.h. r=nika 2020-11-23 16:05:02 +00:00
Shmem.h Bug 1660470 - Split ShmemMessageUtils.h from Shmem.h. r=nika 2020-11-23 16:05:02 +00:00
ShmemMessageUtils.h Bug 1660470 - Split ShmemMessageUtils.h from Shmem.h. r=nika 2020-11-23 16:05:02 +00:00
StringUtil.cpp
TaintingIPCUtils.h
TaskFactory.h
Transport.h
TransportSecurityInfoUtils.cpp
TransportSecurityInfoUtils.h Bug 1679148 - declare template for ParamTraits, so that Thunderbird builds succeed. r=sg 2020-11-24 14:44:29 +00:00
Transport_posix.cpp Bug 1715144 - Part 1: Stop adding /ipc/glue to LOCAL_INCLUDES when including chromium-config.mozbuild, r=ipc-reviewers,necko-reviewers,mccr8,valentin 2021-06-09 04:56:48 +00:00
Transport_posix.h
Transport_win.cpp Bug 1632687 - Part 3: Introduce an OS-dependent ChannelId type to reflect that Unix doesn't use channel IDs. r=mccr8 2020-07-22 19:04:48 +00:00
Transport_win.h Bug 1660470 - Add missing include directives/forward declarations. r=nika 2020-11-23 16:21:38 +00:00
URIParams.ipdlh Bug 1714645: Remove NullPrincipalURI. r=ckerschb,nika 2021-07-06 08:23:12 +00:00
URIUtils.cpp Bug 1714645: Remove NullPrincipalURI. r=ckerschb,nika 2021-07-06 08:23:12 +00:00
URIUtils.h
WindowsMessageLoop.cpp Bug 1385014: Use WaitForSingleObjectEx in WaitForSyncNotifyWithA11yReentry when win32k is disabled. r=aklotz 2021-05-06 11:10:20 +00:00
WindowsMessageLoop.h
components.conf
moz.build Bug 1706374 - Part 11: Add NodeController component bridging IPC and Ports, r=handyman 2021-06-22 18:17:22 +00:00
nsIIPCSerializableInputStream.h