gecko-dev/ipc/glue
Nathan Froyd a697f87d36 Bug 1397823 - part 3 - do a better job setting IPC::Message flags; r=kanru
The current IPC::Message constructor takes a large number of arguments,
three of which--the nesting level, the priority, and the
compression--are almost always constant by virtue of the vast majority
of Message construction being done by auto-generated IPDL code.  But
then we take these constant values into the Message constructor, we
check them for various values, and then based on those values, we
perform a bunch of bitfield operations to store flags based on those
values.  This is wasted work.

Furthermore, for replies to IPDL messages, we'll construct a Message
object, and then call mutating setters on the Message object that will
perform even more bitfield manipulations.  Again, these operations are
performing tasks at runtime that are the same every single time, and use
information we already have at compile time.

The impact of these extra operations is not large, maybe 15-30K of extra
code, depending on platform.  Nonetheless, we can easily make them go
away, and make everything cleaner to boot.

This patch adds a HeaderFlags class that encapsulates all the knowledge
about the various kinds of flags Message needs to know about.  We can
construct HeaderFlags objects with strongly-typed enum arguments for the
various kinds of flags, and the compiler can take care of folding all of
those flags together into a constant when possible (and it is possible
for all the IPDL-generated code that instantiates Messages).  The upshot
is that we do no unnecessary work in the Message constructor itself.  We
can also remove various mutating operations on Message, as those
operations were only there to support post-constructor flag twiddling,
which is no longer necessary.
2017-09-15 08:06:11 -04:00
..
BackgroundChild.h Bug 1283609 - Part 3: Core changes, stop using nested event loop in BackgroundChild::GetOrCreateForCurrentThread(); r=billm 2017-08-03 11:22:11 +02:00
BackgroundChildImpl.cpp Bug 1255894: Part 10 - Move StreamFilterParent to necko child process. r=billm,dragana 2017-09-07 17:28:27 -07:00
BackgroundChildImpl.h Bug 1255894: Part 10 - Move StreamFilterParent to necko child process. r=billm,dragana 2017-09-07 17:28:27 -07:00
BackgroundImpl.cpp Bug 1391865 - Use same PBackground for all cooperative threads (r=bevis) 2017-08-25 10:28:23 -07:00
BackgroundParent.h Bug 1350637 - Part 8: Implement BackgroundParent::GetLiveActorArray; r=billm 2017-08-08 23:02:16 +02:00
BackgroundParentImpl.cpp Bug 1255894: Part 10 - Move StreamFilterParent to necko child process. r=billm,dragana 2017-09-07 17:28:27 -07:00
BackgroundParentImpl.h Bug 1255894: Part 10 - Move StreamFilterParent to necko child process. r=billm,dragana 2017-09-07 17:28:27 -07:00
BackgroundUtils.cpp Bug 1396856: Part 2 - Add top outer window ID to LoadInfo. r=ehsan 2017-09-06 14:25:23 -07:00
BackgroundUtils.h Bug 1351146 - P1 - Add more information to redirect chains. r=dragana 2017-05-25 19:42:00 +02:00
BrowserProcessSubThread.cpp
BrowserProcessSubThread.h
CrashReporterClient.cpp
CrashReporterClient.h
CrashReporterHost.cpp Bug 1372405 - Provide names for all runnables in the tree (r=froydnj) 2017-06-26 14:19:58 -07:00
CrashReporterHost.h Bug 1390143 - Generate the parent minidump synchronously to keep parent process's stack when creating paired minidumps. r=gsvelto 2017-08-25 11:12:34 +08:00
CrashReporterMetadataShmem.cpp
CrashReporterMetadataShmem.h
CrossProcessMutex.h
CrossProcessMutex_posix.cpp
CrossProcessMutex_unimplemented.cpp
CrossProcessMutex_windows.cpp
CrossProcessSemaphore.h
CrossProcessSemaphore_posix.cpp Bug 1381253 - Remove redundant control flow declarations rs=ehsan 2017-07-15 19:03:04 +02:00
CrossProcessSemaphore_unimplemented.cpp
CrossProcessSemaphore_windows.cpp
Faulty.cpp Bug 1365321 - remove warnings from faulty r=billm 2017-05-23 08:54:46 -07:00
Faulty.h
FileDescriptor.cpp
FileDescriptor.h
FileDescriptorSetChild.cpp
FileDescriptorSetChild.h
FileDescriptorSetParent.cpp
FileDescriptorSetParent.h
FileDescriptorUtils.cpp
FileDescriptorUtils.h
GeckoChildProcessHost.cpp Bug 1390488 - Pass the childProcessTmpDir from the parent process to the GPU process. r=froydnj 2017-09-13 11:26:25 -04:00
GeckoChildProcessHost.h Bug 1339105 Part 3: Move NPAPI windows process sandbox file rules into SandboxBroker. r=jimm 2017-05-22 20:41:28 +01:00
IOThreadChild.h
IPCMessageUtils.cpp
IPCMessageUtils.h Bug 1383816 - Adds IPC Read and Write methods for FocusTarget and NoFocusState structs and creates EmptyStructSerializer helper class; r=botond 2017-09-02 14:10:40 -05:00
IPCStream.ipdlh
IPCStreamAlloc.h
IPCStreamChild.cpp Bug 1351488 - Simplify IPCStreamSource::DoRead() and remove reallocation of the buffer (r=asuth) 2017-08-29 10:42:33 -05:00
IPCStreamDestination.cpp Bug 1351488 - Simplify IPCStreamSource::DoRead() and remove reallocation of the buffer (r=asuth) 2017-08-29 10:42:33 -05:00
IPCStreamDestination.h Bug 1351488 - Simplify IPCStreamSource::DoRead() and remove reallocation of the buffer (r=asuth) 2017-08-29 10:42:33 -05:00
IPCStreamParent.cpp Bug 1351488 - Simplify IPCStreamSource::DoRead() and remove reallocation of the buffer (r=asuth) 2017-08-29 10:42:33 -05:00
IPCStreamSource.cpp Bug 1351488 - Simplify IPCStreamSource::DoRead() and remove reallocation of the buffer (r=asuth) 2017-08-29 10:42:33 -05:00
IPCStreamSource.h Bug 1351488 - Simplify IPCStreamSource::DoRead() and remove reallocation of the buffer (r=asuth) 2017-08-29 10:42:33 -05:00
IPCStreamUtils.cpp
IPCStreamUtils.h
InputStreamParams.ipdlh Bug 1397645 - Propagation of the IPCBlobInputStream slicing to the parent process, r=asuth 2017-09-11 17:29:44 +02:00
InputStreamUtils.cpp Bug 1397645 - Propagation of the IPCBlobInputStream slicing to the parent process, r=asuth 2017-09-11 17:29:44 +02:00
InputStreamUtils.h
MessageChannel.cpp Bug 1397823 - part 3 - do a better job setting IPC::Message flags; r=kanru 2017-09-15 08:06:11 -04:00
MessageChannel.h Merge inbound to central, a=merge 2017-08-25 16:21:57 -07:00
MessageLink.cpp Bug 1388920 - Call OnChannelConnected handler in parent protocols (r=bkelly) 2017-08-10 14:31:13 -07:00
MessageLink.h Bug 1378712 - Remove all trailing whitespaces r=Ehsan 2017-07-06 14:00:35 +02:00
MessagePump.cpp Bug 1391848 - Use nsIEventTarget instead of nsIThread for MessageLoop/Pump (r=kanru) 2017-08-25 10:28:23 -07:00
MessagePump.h Bug 1391848 - Use nsIEventTarget instead of nsIThread for MessageLoop/Pump (r=kanru) 2017-08-25 10:28:23 -07:00
Neutering.h
PBackground.ipdl Bug 1255894: Part 10 - Move StreamFilterParent to necko child process. r=billm,dragana 2017-09-07 17:28:27 -07:00
PBackgroundSharedTypes.ipdlh
PBackgroundTest.ipdl
PChildToParentStream.ipdl Bug 1351488 - Simplify IPCStreamSource::DoRead() and remove reallocation of the buffer (r=asuth) 2017-08-29 10:42:33 -05:00
PFileDescriptorSet.ipdl
PParentToChildStream.ipdl Bug 1351488 - Simplify IPCStreamSource::DoRead() and remove reallocation of the buffer (r=asuth) 2017-08-29 10:42:33 -05:00
ProcessChild.cpp
ProcessChild.h
ProcessUtils.h
ProcessUtils_bsd.cpp
ProcessUtils_linux.cpp
ProcessUtils_mac.mm
ProcessUtils_none.cpp
ProtocolTypes.ipdlh
ProtocolUtils.cpp Bug 1397823 - part 3 - do a better job setting IPC::Message flags; r=kanru 2017-09-15 08:06:11 -04:00
ProtocolUtils.h Bug 1333962 - Add nsILabelableRunnable to label runnables like vsync (r=kanru) 2017-08-25 10:28:23 -07:00
ScopedXREEmbed.cpp
ScopedXREEmbed.h
SharedMemory.cpp
SharedMemory.h
SharedMemoryBasic.h
SharedMemoryBasic_android.cpp
SharedMemoryBasic_android.h Bug 1232119 - Add fuzzer for SharedMemory. r=billm 2017-05-23 22:36:28 +02:00
SharedMemoryBasic_chromium.h Bug 1232119 - Add fuzzer for SharedMemory. r=billm 2017-05-23 22:36:28 +02:00
SharedMemoryBasic_mach.h Bug 1232119 - Add fuzzer for SharedMemory. r=billm 2017-05-23 22:36:28 +02:00
SharedMemoryBasic_mach.mm
SharedMemory_posix.cpp
SharedMemory_windows.cpp
Shmem.cpp Bug 1397823 - part 3 - do a better job setting IPC::Message flags; r=kanru 2017-09-15 08:06:11 -04:00
Shmem.h
StringUtil.cpp
TaskFactory.h Bug 1372405 - Provide names for all runnables in the tree (r=froydnj) 2017-06-26 14:19:58 -07:00
Transport.h
Transport_posix.cpp
Transport_posix.h
Transport_win.cpp
Transport_win.h
URIParams.ipdlh Bug 1322874 - Get rid of nsIURI.originCharset. r=valentin.gosu 2017-08-02 20:43:30 +09:00
URIUtils.cpp
URIUtils.h
WindowsMessageLoop.cpp Bug 1378712 - Remove all trailing whitespaces r=Ehsan 2017-07-06 14:00:35 +02:00
WindowsMessageLoop.h
moz.build Bug 1350637 - Part 1: Move PStorage stubs from PContent to PBackground; r=asuth r=billm 2017-08-08 22:56:49 +02:00
nsIIPCBackgroundChildCreateCallback.h
nsIIPCSerializableInputStream.h
nsIIPCSerializableURI.h