gecko-dev/dom/ipc
Nicholas Nethercote 68124009fc Bug 1438678 - Pass early prefs via shared memory instead of the command line. r=bobowen,jld,glandium.
This patch replaces the large -intPrefs/-boolPrefs/-stringPrefs flags with
a short-lived, anonymous, shared memory segment that is used to pass the early
prefs.

Removing the bloat from the command line is nice, but more important is the
fact that this will let us pass more prefs at content process start-up, which
will allow us to remove the early/late prefs split (bug 1436911).

Although this mechanism is only used for prefs, it's conceivable that it could
be used for other data that must be received very early by children, and for
which the command line isn't ideal.

Notable details:

- Much of the patch deals with the various platform-specific ways of passing
  handles/fds to children.

  - Linux and Mac: we use a fixed fd (8) in combination with the new
    GeckoChildProcessHost::AddFdToRemap() function (which ensures the child
    won't close the fd).

  - Android: like Linux and Mac, but the handles get passed via "parcels" and
    we use the new SetPrefsFd() function instead of the fixed fd.

  - Windows: there is no need to duplicate the handle because Windows handles
    are system-wide. But we do use the new
    GeckoChildProcessHost::AddHandleToShare() function to add it to the list of
    inheritable handles. We also ensure that list is processed on all paths
    (MOZ_SANDBOX with sandbox, MOZ_SANDBOX without sandbox, non-MOZ_SANDBOX) so
    that the handles are marked as inheritable. The handle is passed via the
    -prefsHandle flag.

  The -prefsLen flag is used on all platforms to indicate the size of the
  shared memory segment.

- The patch also moves the serialization/deserialization of the prefs in/out of
  the shared memory into libpref, which is a better spot for it. (This means
  Preferences::MustSendToContentProcesses() can be removed.)

MozReview-Commit-ID: 8fREEBiYFvc

--HG--
extra : rebase_source : 7e4c8ebdbcd7d74d6bd2ab3c9e75a6a17dbd8dfe
2018-02-16 17:54:16 +11:00
..
tests Backed out 6 changesets (bug 888600) for beta simulation failures: build bustage on Linux and Windows opt (bug 1442036) and devtools failure browser_net_view-source-debugger.js (bug 1441961). a=backout 2018-03-01 11:51:09 +02:00
CoalescedInputData.h Bug 1407700 Part1: Revise CoalescedInputData interfaces. r=smaug. 2017-10-12 11:22:36 +08:00
CoalescedMouseData.cpp Bug 1303957 Part1: Add support for PointerEvent.getCoalescedEvents. r=smaug. 2017-09-20 13:00:57 +08:00
CoalescedMouseData.h Bug 1404273 - [Pointer Event] Coalescing mousemove for different pointers. r=smaug. 2017-09-20 11:57:56 +08:00
CoalescedWheelData.cpp Bug 1361067 Part1: Refactor coalescing mouse wheel events. r=smaug. 2017-08-13 14:08:48 +08:00
CoalescedWheelData.h Bug 1361067 Part1: Refactor coalescing mouse wheel events. r=smaug. 2017-08-13 14:08:48 +08:00
ColorPickerParent.cpp
ColorPickerParent.h
ContentBridgeChild.cpp Bug 1390424 - Move ParentActivated message from PContent/PContentBridge back to PBrowser. r=billm 2017-08-23 17:02:57 +08:00
ContentBridgeChild.h Bug 1390424 - Move ParentActivated message from PContent/PContentBridge back to PBrowser. r=billm 2017-08-23 17:02:57 +08:00
ContentBridgeParent.cpp Backed out 6 changesets (bug 888600) for beta simulation failures: build bustage on Linux and Windows opt (bug 1442036) and devtools failure browser_net_view-source-debugger.js (bug 1441961). a=backout 2018-03-01 11:51:09 +02:00
ContentBridgeParent.h Bug 1390424 - Move ParentActivated message from PContent/PContentBridge back to PBrowser. r=billm 2017-08-23 17:02:57 +08:00
ContentChild.cpp Bug 1440816: Part 2 - Clone stacks when sending console messages to the parent process. r=baku 2018-02-23 17:21:49 -08:00
ContentChild.h Bug 1433646 - Allow ContentChild::Recv(Re)InitRendering to fail with the GPU process. r=rhunt 2018-02-14 18:07:53 -05:00
ContentParent.cpp Bug 1438678 - Pass early prefs via shared memory instead of the command line. r=bobowen,jld,glandium. 2018-02-16 17:54:16 +11:00
ContentParent.h Bug 1440816: Part 2 - Clone stacks when sending console messages to the parent process. r=baku 2018-02-23 17:21:49 -08:00
ContentPrefs.cpp Bug 1442561 part 1 - Add browser pref for misc Spectre object type mitigations. r=luke 2018-03-11 20:14:03 +01:00
ContentPrefs.h Bug 1421541 - Overhaul the prefs phase code. r=glandium 2017-11-30 09:14:32 +11:00
ContentProcess.cpp Bug 1438678 - Pass early prefs via shared memory instead of the command line. r=bobowen,jld,glandium. 2018-02-16 17:54:16 +11:00
ContentProcess.h Bug 1438678 - Pass early prefs via shared memory instead of the command line. r=bobowen,jld,glandium. 2018-02-16 17:54:16 +11:00
ContentProcessManager.cpp
ContentProcessManager.h
CPOWManagerGetter.h
DOMTypes.ipdlh Bug 1440511 - Part 8: Include ParamTraits impls which are used in ipdlh files, r=froydnj 2018-03-05 16:00:03 -05:00
FilePickerParent.cpp
FilePickerParent.h Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj 2017-11-05 19:37:28 -08:00
IdType.h
jar.mn
manifestMessages.js Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian 2018-01-29 15:20:18 -08:00
MemoryReportRequest.cpp
MemoryReportRequest.h
MemoryReportTypes.ipdlh
moz.build Bug 1440816: Part 2 - Clone stacks when sending console messages to the parent process. r=baku 2018-02-23 17:21:49 -08:00
nsIContentChild.cpp Backed out 6 changesets (bug 888600) for beta simulation failures: build bustage on Linux and Windows opt (bug 1442036) and devtools failure browser_net_view-source-debugger.js (bug 1441961). a=backout 2018-03-01 11:51:09 +02:00
nsIContentChild.h Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj 2017-08-16 16:48:52 -07:00
nsIContentParent.cpp Backed out 6 changesets (bug 888600) for beta simulation failures: build bustage on Linux and Windows opt (bug 1442036) and devtools failure browser_net_view-source-debugger.js (bug 1441961). a=backout 2018-03-01 11:51:09 +02:00
nsIContentParent.h Backed out 6 changesets (bug 888600) for beta simulation failures: build bustage on Linux and Windows opt (bug 1442036) and devtools failure browser_net_view-source-debugger.js (bug 1441961). a=backout 2018-03-01 11:51:09 +02:00
nsIHangReport.idl Bug 1356334: Part 5 - Add add-on name to slow script messages. r=billm 2017-08-17 20:17:51 -07:00
PBrowser.ipdl Bug 1438425. Delete DocumentRenderer. r=jesup 2018-02-15 16:28:02 -05:00
PBrowserOrId.ipdlh
PColorPicker.ipdl
PContent.ipdl Bug 1440816: Part 2 - Clone stacks when sending console messages to the parent process. r=baku 2018-02-23 17:21:49 -08:00
PContentBridge.ipdl Bug 1390424 - Move ParentActivated message from PContent/PContentBridge back to PBrowser. r=billm 2017-08-23 17:02:57 +08:00
PContentPermission.ipdlh
PContentPermissionRequest.ipdl
PCycleCollectWithLogs.ipdl
PermissionMessageUtils.cpp
PermissionMessageUtils.h
PFilePicker.ipdl
PLoginReputation.ipdl Bug 1407878 - P2. Add PLoginReputation.ipdl for LoginReputationService. r=billm,francois 2017-12-07 16:32:52 +08:00
PPluginWidget.ipdl
PProcessHangMonitor.ipdl Bug 1356334: Part 5 - Add add-on name to slow script messages. r=billm 2017-08-17 20:17:51 -07:00
PreallocatedProcessManager.cpp Bug 1424505 - Avoid recycling content process when accessibility is active. r=aklotz 2018-03-08 19:33:47 -06:00
PreallocatedProcessManager.h Bug 1424505 - Avoid recycling content process when accessibility is active. r=aklotz 2018-03-08 19:33:47 -06:00
ProcessHangMonitor.cpp Bug 1402519 - Remove MOZ_CRASHREPORTER directives from dom; r=peterv 2017-10-10 12:43:09 +02:00
ProcessHangMonitor.h Bug 1393230 - Part 1: Remove remaining string forward declarations. r=njn 2017-08-23 16:27:16 -07:00
ProcessHangMonitorIPC.h
ProcessPriorityManager.cpp Bug 1404198: Part 2i - Switch to NS_NewTimer* in dom. r=njn 2017-10-15 23:15:40 -07:00
ProcessPriorityManager.h
PTabContext.ipdlh Bug 1383876 - Part 1: Remove GroupedSHistory and Prerendering logic from C++ code, r=freesamael, r=smaug 2018-01-12 17:52:52 -05:00
PURLClassifier.ipdl
PURLClassifierInfo.ipdlh Bug 1351147 - Use fullhash instead of prefix in OnClassifyComplete r=francois 2017-08-04 18:20:13 +08:00
PURLClassifierLocal.ipdl
remote-test.js Backed out 6 changesets (bug 888600) for beta simulation failures: build bustage on Linux and Windows opt (bug 1442036) and devtools failure browser_net_view-source-debugger.js (bug 1441961). a=backout 2018-03-01 11:51:09 +02:00
ServiceWorkerConfiguration.ipdlh
StructuredCloneData.cpp
StructuredCloneData.h
TabChild.cpp Bug 1024082: Remove most of the nsIPresShell::FrameManager calls. r=dholbert 2018-03-07 10:17:49 +01:00
TabChild.h Backed out 6 changesets (bug 888600) for beta simulation failures: build bustage on Linux and Windows opt (bug 1442036) and devtools failure browser_net_view-source-debugger.js (bug 1441961). a=backout 2018-03-01 11:51:09 +02:00
TabContext.cpp Bug 1383876 - Part 1: Remove GroupedSHistory and Prerendering logic from C++ code, r=freesamael, r=smaug 2018-01-12 17:52:52 -05:00
TabContext.h Bug 1383876 - Part 1: Remove GroupedSHistory and Prerendering logic from C++ code, r=freesamael, r=smaug 2018-01-12 17:52:52 -05:00
TabMessageUtils.cpp
TabMessageUtils.h Bug 1402519 - Remove MOZ_CRASHREPORTER directives from dom; r=peterv 2017-10-10 12:43:09 +02:00
TabParent.cpp Bug 1024082: Remove most of the nsIPresShell::FrameManager calls. r=dholbert 2018-03-07 10:17:49 +01:00
TabParent.h Bug 1438425. Delete DocumentRenderer. r=jesup 2018-02-15 16:28:02 -05:00
TelemetryScrollProbe.cpp
TelemetryScrollProbe.h
test.xul Backed out 6 changesets (bug 888600) for beta simulation failures: build bustage on Linux and Windows opt (bug 1442036) and devtools failure browser_net_view-source-debugger.js (bug 1441961). a=backout 2018-03-01 11:51:09 +02:00
URLClassifierChild.h Bug 1351147 - Use fullhash instead of prefix in OnClassifyComplete r=francois 2017-08-04 18:20:13 +08:00
URLClassifierParent.cpp
URLClassifierParent.h Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj 2017-11-05 19:37:28 -08:00