Граф коммитов

6676 Коммитов

Автор SHA1 Сообщение Дата
Nika Layzell 42952972ef Bug 1706374 - Part 4: Run ports gtests in tree, r=handyman
The ports library import came with 2 gtests. This patch gets them running under
our gtest runner to ensure we don't break the ports functionality.

Differential Revision: https://phabricator.services.mozilla.com/D112768
2021-06-22 18:17:19 +00:00
Nika Layzell 03f4afa8fb Bug 1706374 - Part 3: Get mojo/core/ports building in libxul, r=handyman
This involves replacing a number of types normally provided by chromium's
`base` with their XPCOM counterparts etc.

Differential Revision: https://phabricator.services.mozilla.com/D112767
2021-06-22 18:17:18 +00:00
Nika Layzell d1f7ecf8e1 Bug 1706374 - Part 2: Format mojo/core/ports with clang-format, r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D112766
2021-06-22 18:17:18 +00:00
Nika Layzell 12a9501583 Bug 1706374 - Part 1: Import the mojo/core/ports directory from Chromium, r=handyman
This initial import does not build, and will be made to build in following
parts.

Differential Revision: https://phabricator.services.mozilla.com/D112765
2021-06-22 18:17:17 +00:00
Mike Hommey 744db845c6 Bug 1700534 - Coalesce RLBox wasmboxed libraries. r=firefox-build-system-reviewers,shravanrn,bholley,andi,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D116440
2021-06-22 05:31:33 +00:00
Butkovits Atila 83f57b5c69 Backed out 22 changesets (bug 1714226, bug 1706374, bug 1713148) for causing build bustages on MessageChannel.cpp. CLOSED TREE
Backed out changeset ea469eaa54ca (bug 1713148)
Backed out changeset fd8523d5126e (bug 1713148)
Backed out changeset f2e5309c914c (bug 1713148)
Backed out changeset 2da57973ed55 (bug 1713148)
Backed out changeset 677e1ee99bb2 (bug 1713148)
Backed out changeset b4c0619e79bf (bug 1706374)
Backed out changeset c02fa459e77d (bug 1706374)
Backed out changeset 72dc6537cf0b (bug 1706374)
Backed out changeset 48088463c656 (bug 1706374)
Backed out changeset b09ae4c3a94b (bug 1706374)
Backed out changeset 04422175004b (bug 1706374)
Backed out changeset 110b2384e7d1 (bug 1706374)
Backed out changeset ab2b086abbd4 (bug 1706374)
Backed out changeset ffde07f73249 (bug 1706374)
Backed out changeset c6303af17ff4 (bug 1706374)
Backed out changeset 02249671c2f9 (bug 1706374)
Backed out changeset a6a5d05b5636 (bug 1706374)
Backed out changeset e21b6defb805 (bug 1706374)
Backed out changeset c72c5be9ddb1 (bug 1706374)
Backed out changeset 23cd961575a6 (bug 1706374)
Backed out changeset b412d6e9e145 (bug 1706374)
Backed out changeset a8ec285d6472 (bug 1714226)
2021-06-22 04:03:56 +03:00
Nika Layzell 8e8aa56ee2 Bug 1713148 - Part 5: Remove ThreadLink, r=handyman
This removes the last form of unique link between two MessageChannels so that
all MessageChannels communicate using PortLink, as it is fairly straightforward
to use PortLink to communicate between two threads in-process.

Differential Revision: https://phabricator.services.mozilla.com/D116672
2021-06-21 21:53:13 +00:00
Nika Layzell 03646b0682 Bug 1713148 - Part 4: Remove ProcessLink, r=handyman
After the changes in part 3, this type is now dead code and can be fully
removed.

Differential Revision: https://phabricator.services.mozilla.com/D116671
2021-06-21 21:53:13 +00:00
Nika Layzell 758f8f7d8f Bug 1713148 - Part 3: Use ports for Endpoint-created actors, r=handyman
This adjusts how all actors created using `Endpoint` behave so that they now
use ports instead of creating a unique native channel connection between each
pair of processes.

Differential Revision: https://phabricator.services.mozilla.com/D116670
2021-06-21 21:53:13 +00:00
Nika Layzell ddf32ef8de Bug 1713148 - Part 2: Support port attachments on IPC messages, r=handyman
These port attachments are stored directly on the IPC::Message until the
message is ready to be routed to another process, at which point they will be
attached to the port in WillBeRoutedExternally. When the message is then
received on the other side, the ports will be re-extracted from the
UserMessageEvent before it is discarded and re-added to the IPC::Message so
that serializers only need to interact directly with the IPC::Message type.

Differential Revision: https://phabricator.services.mozilla.com/D116669
2021-06-21 21:53:12 +00:00
Nika Layzell 0bfe790a38 Bug 1713148 - Part 1: Expose UserMessageEvent to WillBeRoutedExternally, r=handyman
This is used because, unlike in Mojo, we cannot get from the IPC::Message
object to its enclosing UserMessageEvent object to attach more ports to it, and
this extra parameter makes that easy to do.

Differential Revision: https://phabricator.services.mozilla.com/D116668
2021-06-21 21:53:12 +00:00
Nika Layzell 344d8d6622 Bug 1706374 - Part 13: Remove the event footer from an IPC::Message when deserializing, r=handyman,glandium
This unfortunately requires a new method to be added to BufferList to
support truncating the buffer to a particular iterator.

Differential Revision: https://phabricator.services.mozilla.com/D116666
2021-06-21 21:53:11 +00:00
Nika Layzell 1d4aba6770 Bug 1706374 - Part 12b: Use NodeController for primary process channels, r=handyman
This extends on the changes in part 12a and consumes the new PortRef-based API
in all existing process types other than the fork server. The IPDL C++ unit
tests were already broken before this change, and were not updated.

Differential Revision: https://phabricator.services.mozilla.com/D112777
2021-06-21 21:53:11 +00:00
Nika Layzell 68c606d1e5 Bug 1706374 - Part 12a: Initialize NodeController when creating IO thread, r=handyman
This also consumes the existing channel created when launching a process to
create the the conneciton required by NodeController for communicating between
processes. In part 12b, consumers of the broken APIs will be adjusted to use
the new interface.

The new routing approach is not used for the fork server process, as an IO
thread and the NodeController object cannot be initialized before the fork has
been performed, and the IPC requirements of that process are fairly minimal.

Differential Revision: https://phabricator.services.mozilla.com/D112776
2021-06-21 21:53:10 +00:00
Nika Layzell 6de2add6d7 Bug 1706374 - Part 11: Add NodeController component bridging IPC and Ports, r=handyman
The NodeController and NodeChannel types act as the backbone connecting the
existing IPC logic and driving the ports routing code. Individual NodeChannel
objects wrap and respond to messages from IPC::Channel, and the NodeController
orchestrates all messaging for a process.

The design of these types are inspired by the types with the same names from
Mojo but have been simplified and streamlined to only support features used by
Gecko.

Support for attaching ports or handles to messages hasn't been added yet, but
can be added in follow-up patches.

Differential Revision: https://phabricator.services.mozilla.com/D112775
2021-06-21 21:53:10 +00:00
Nika Layzell 4a956a2673 Bug 1706374 - Part 10: Remove unnecessary IToplevelProtocol::OnChannelConnected, r=handyman,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D116665
2021-06-21 21:53:10 +00:00
Nika Layzell 1811e3331a Bug 1706374 - Part 9: Allow reading OtherPid() from an opened IPC::Channel, r=handyman
This will be used to handle pre-opened channels more reliably in ports code.

Differential Revision: https://phabricator.services.mozilla.com/D112774
2021-06-21 21:53:09 +00:00
Nika Layzell 56bc256e42 Bug 1706374 - Part 8: Add support for separate footers to IPC::Message, r=handyman
These will be used to serialize extra event metadata into IPC messages when
they're sent over the ports infrastructure. In the future better integration
may be used to reduce the overhead of this if necessary.

Differential Revision: https://phabricator.services.mozilla.com/D112773
2021-06-21 21:53:09 +00:00
Nika Layzell 4945c6bfd3 Bug 1706374 - Part 7: Add owning helpers for working with transport descriptors, r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D112772
2021-06-21 21:53:08 +00:00
Nika Layzell 681d4a66f5 Bug 1706374 - Part 6: Add Mozilla extensions to the Name type, r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D112771
2021-06-21 21:53:08 +00:00
Nika Layzell d02a8a14cc Bug 1706374 - Part 5b: Apply suggested clang-tidy fixes to ports, r=handyman
Mechanical change applying clang-tidy fixes

Differential Revision: https://phabricator.services.mozilla.com/D112770
2021-06-21 21:53:08 +00:00
Nika Layzell 050548d334 Bug 1706374 - Part 5a: Apply suggested clang-tidy fixes to the ports code, r=handyman
Mechanical change applying clang-tidy fixes

Differential Revision: https://phabricator.services.mozilla.com/D112769
2021-06-21 21:53:07 +00:00
Nika Layzell 12db5b7e19 Bug 1706374 - Part 4: Run ports gtests in tree, r=handyman
The ports library import came with 2 gtests. This patch gets them running under
our gtest runner to ensure we don't break the ports functionality.

Differential Revision: https://phabricator.services.mozilla.com/D112768
2021-06-21 21:53:07 +00:00
Nika Layzell 8381830670 Bug 1706374 - Part 3: Get mojo/core/ports building in libxul, r=handyman
This involves replacing a number of types normally provided by chromium's
`base` with their XPCOM counterparts etc.

Differential Revision: https://phabricator.services.mozilla.com/D112767
2021-06-21 21:53:06 +00:00
Nika Layzell 2a2037d8e9 Bug 1706374 - Part 2: Format mojo/core/ports with clang-format, r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D112766
2021-06-21 21:53:06 +00:00
Nika Layzell 8008933c20 Bug 1706374 - Part 1: Import the mojo/core/ports directory from Chromium, r=handyman
This initial import does not build, and will be made to build in following
parts.

Differential Revision: https://phabricator.services.mozilla.com/D112765
2021-06-21 21:53:06 +00:00
Andi-Bogdan Postelnicu f07c975367 Bug 1519636 - Reformat recent changes to the Google coding style. r=necko-reviewers,emilio
Updated with clang-format version 12.0.0 (taskcluster-FZRqPXamQIOU_i4hF0cAcg)

Differential Revision: https://phabricator.services.mozilla.com/D117905
2021-06-17 11:00:22 +00:00
Florian Quèze dfeb53e219 Bug 1715257 - Remove Task Tracer code from the profiler, r=gerald,necko-reviewers.
Differential Revision: https://phabricator.services.mozilla.com/D117996
2021-06-17 09:33:00 +00:00
Iulian Moraru b02492de66 Backed out changeset 617a466d0cce (bug 1715257) for causing build bustages. CLOSED TREE 2021-06-17 10:58:16 +03:00
Florian Quèze 7b4906a6bd Bug 1715257 - Remove Task Tracer code from the profiler, r=gerald,necko-reviewers.
Differential Revision: https://phabricator.services.mozilla.com/D117996
2021-06-17 06:12:10 +00:00
Aaron Klotz 93f41e2170 Bug 1707954: Part 3 - Add eager MTA creation to mscom::EnsureMTA; r=Jamie
* We make `EnsureMTA`'s default constructor `private`, and `ProcessRuntime` a friend.
  `ProcessRuntime` calls this to eagerly create the MTA.
* The default constructor uses the new-ish `CoIncrementMTAUsage` to create the
  MTA without requiring a dedicated thread (when available). Otherwise we
  fall back to the traditional method. In the latter case, we synchronously
  wait for the initialization to complete so that we are guaranteed to have
  an MTA when we return.
* Some minor refactoring to make it easier to do the sync wait in the
  default constructor. I also renamed a couple of things just to make them
  more clear.

Differential Revision: https://phabricator.services.mozilla.com/D113562
2021-06-14 21:53:18 +00:00
Aaron Klotz 0785438543 Bug 1707954: Part 1 - Change mscom::ProcessRuntime to ensure MTA creation during startup; r=Jamie
This patch does the following:

* General cleanup:
  * More explicit restrictions of how/when the various constructors are available.
  * `InitializeSecurity` is made `static`, since it doesn't really manipulate instance variables.
  * We move some logic for resolving `CoInitializeEx` flags into `GetDesiredApartmentType`.
* Addition of `PostInit`:
  * This doesn't do anything at the moment, but since I'm already making a bunch
    of changes, I wanted to add this too. `PostInit` is a static method that
    is invoked once the `ProcessRuntime` is finished initializing, and, when
    present, the sandbox is fully enabled.
* We call `EnsureMTA`'s default constructor to eagerly bring up the MTA. This
  causes all background threads to implicitly become members of the MTA, which
  means that we can eliminate `CoInitializeEx` calls throughout our codebase,
  since they're slow and most developers do not have a clear understanding of
  what those functions actually do.
  * This also simplifies the COM initialization in sandboxed content processes
    with Win32K lockdown, since if our main thread is in the implicit MTA, we
    can immediately initialize ourselves without needing to punt that work
    over to the persistent MTA thread.

Differential Revision: https://phabricator.services.mozilla.com/D113560
2021-06-14 21:53:17 +00:00
Alexandre Lissy 59f1595f14 Bug 1651133 - Double-check the build ID to avoid spurious about:restartrequired r=jld
Differential Revision: https://phabricator.services.mozilla.com/D115593
2021-06-14 10:33:19 +00:00
Gabriele Svelto a7c337103a Bug 1697895 - Register the WER runtime exception module in child processes r=KrisWright
This patch sets up a few different things that will be used by the WER runtime
exception module when it needs to notify the main process of a child process
crash.

For every child process we allocate a structure in the main process called
WindowsErrorReportingData that contains three things:
- The address of the function used to notify the main process that there's a
  pending minidump for a given child process
- The PID of said child process
- The name of the minidump that has been generated

The first field is filled up by the main process and will be read by the WER
process when running the runtime exception module, the second and third fields
on the other hand start empty and will be written into by the runtime exception
module after it has generated a minidump.

I know this sounds scary. It is. But bear with me please.

When we register the runtime exception module we can pass it a single
pointer-sized parameter but we need to pass it at least another pointer that
includes data coming from the child process itself (this one is called
InProcessWindowsErrorReportingData). This data currently includes only the
process type but will also include certain annotations in the future
(e.g. bug 1711418). So here's what we do: we store a pointer to the parent
data structure in the child process command-line (cringe) and we read it
from the runtime exception module by reading the crashed process command-line
arguments and parsing them (double-cringe).

Armed with this information the WER runtime exception module can populate
the info for the generated minidump and then push it into the main process
by calling CreateRemoteThread() (which creates a new thread in the main
process, triple-cringe at this point).

Differential Revision: https://phabricator.services.mozilla.com/D115379
2021-06-11 09:59:49 +00:00
Iulian Moraru d5be2d4af2 Backed out 5 changesets (bug 1682518, bug 1703761, bug 1711418, bug 1697895) for causing build bustages on nsEmbedFunctions.cpp. CLOSED TREE
Backed out changeset d747dd950198 (bug 1711418)
Backed out changeset 58092e594233 (bug 1711418)
Backed out changeset d9b5dd9f7307 (bug 1703761)
Backed out changeset 345c36d8e46b (bug 1682518)
Backed out changeset a9be55acfd91 (bug 1697895)
2021-06-11 07:08:38 +03:00
Gabriele Svelto 1a86d1dee4 Bug 1697895 - Register the WER runtime exception module in child processes r=KrisWright
This patch sets up a few different things that will be used by the WER runtime
exception module when it needs to notify the main process of a child process
crash.

For every child process we allocate a structure in the main process called
WindowsErrorReportingData that contains three things:
- The address of the function used to notify the main process that there's a
  pending minidump for a given child process
- The PID of said child process
- The name of the minidump that has been generated

The first field is filled up by the main process and will be read by the WER
process when running the runtime exception module, the second and third fields
on the other hand start empty and will be written into by the runtime exception
module after it has generated a minidump.

I know this sounds scary. It is. But bear with me please.

When we register the runtime exception module we can pass it a single
pointer-sized parameter but we need to pass it at least another pointer that
includes data coming from the child process itself (this one is called
InProcessWindowsErrorReportingData). This data currently includes only the
process type but will also include certain annotations in the future
(e.g. bug 1711418). So here's what we do: we store a pointer to the parent
data structure in the child process command-line (cringe) and we read it
from the runtime exception module by reading the crashed process command-line
arguments and parsing them (double-cringe).

Armed with this information the WER runtime exception module can populate
the info for the generated minidump and then push it into the main process
by calling CreateRemoteThread() (which creates a new thread in the main
process, triple-cringe at this point).

Differential Revision: https://phabricator.services.mozilla.com/D115379
2021-06-10 22:01:32 +00:00
Brindusan Cristian df90ffe9bc Backed out 5 changesets (bug 1697895, bug 1682518, bug 1703761, bug 1711418) for causing Windows 2012 x64 asan buid bustages.
CLOSED TREE

Backed out changeset 4cc2cb3653f2 (bug 1711418)
Backed out changeset 02cf2dc4c3c8 (bug 1711418)
Backed out changeset ca35e73d9445 (bug 1703761)
Backed out changeset 43c12d3f5c4f (bug 1682518)
Backed out changeset d75aef90ac53 (bug 1697895)
2021-06-10 16:30:44 +03:00
Gabriele Svelto 1ebc33d4a4 Bug 1697895 - Register the WER runtime exception module in child processes r=KrisWright
This patch sets up a few different things that will be used by the WER runtime
exception module when it needs to notify the main process of a child process
crash.

For every child process we allocate a structure in the main process called
WindowsErrorReportingData that contains three things:
- The address of the function used to notify the main process that there's a
  pending minidump for a given child process
- The PID of said child process
- The name of the minidump that has been generated

The first field is filled up by the main process and will be read by the WER
process when running the runtime exception module, the second and third fields
on the other hand start empty and will be written into by the runtime exception
module after it has generated a minidump.

I know this sounds scary. It is. But bear with me please.

When we register the runtime exception module we can pass it a single
pointer-sized parameter but we need to pass it at least another pointer that
includes data coming from the child process itself (this one is called
InProcessWindowsErrorReportingData). This data currently includes only the
process type but will also include certain annotations in the future
(e.g. bug 1711418). So here's what we do: we store a pointer to the parent
data structure in the child process command-line (cringe) and we read it
from the runtime exception module by reading the crashed process command-line
arguments and parsing them (double-cringe).

Armed with this information the WER runtime exception module can populate
the info for the generated minidump and then push it into the main process
by calling CreateRemoteThread() (which creates a new thread in the main
process, triple-cringe at this point).

Differential Revision: https://phabricator.services.mozilla.com/D115379
2021-06-10 11:58:37 +00:00
Marian-Vasile Laza 5c483b46df Backed out 4 changesets (bug 1707954) for causing bc failures in ClearOnShutdown.cpp.
CLOSED TREE

Backed out changeset 7cb0db27236c (bug 1707954)
Backed out changeset fd52d202d10b (bug 1707954)
Backed out changeset 55586d8f7bf4 (bug 1707954)
Backed out changeset 49406bdac5ec (bug 1707954)
2021-06-10 09:13:45 +03:00
Aaron Klotz b16f77c62b Bug 1707954: Part 3 - Add eager MTA creation to mscom::EnsureMTA; r=Jamie
* We make `EnsureMTA`'s default constructor `private`, and `ProcessRuntime` a friend.
  `ProcessRuntime` calls this to eagerly create the MTA.
* The default constructor uses the new-ish `CoIncrementMTAUsage` to create the
  MTA without requiring a dedicated thread (when available). Otherwise we
  fall back to the traditional method. In the latter case, we synchronously
  wait for the initialization to complete so that we are guaranteed to have
  an MTA when we return.
* Some minor refactoring to make it easier to do the sync wait in the
  default constructor. I also renamed a couple of things just to make them
  more clear.

Differential Revision: https://phabricator.services.mozilla.com/D113562
2021-06-09 21:38:14 +00:00
Aaron Klotz 6ff70a37d9 Bug 1707954: Part 1 - Change mscom::ProcessRuntime to ensure MTA creation during startup; r=Jamie
This patch does the following:

* General cleanup:
  * More explicit restrictions of how/when the various constructors are available.
  * `InitializeSecurity` is made `static`, since it doesn't really manipulate instance variables.
  * We move some logic for resolving `CoInitializeEx` flags into `GetDesiredApartmentType`.
* Addition of `PostInit`:
  * This doesn't do anything at the moment, but since I'm already making a bunch
    of changes, I wanted to add this too. `PostInit` is a static method that
    is invoked once the `ProcessRuntime` is finished initializing, and, when
    present, the sandbox is fully enabled.
* We call `EnsureMTA`'s default constructor to eagerly bring up the MTA. This
  causes all background threads to implicitly become members of the MTA, which
  means that we can eliminate `CoInitializeEx` calls throughout our codebase,
  since they're slow and most developers do not have a clear understanding of
  what those functions actually do.
  * This also simplifies the COM initialization in sandboxed content processes
    with Win32K lockdown, since if our main thread is in the implicit MTA, we
    can immediately initialize ourselves without needing to punt that work
    over to the persistent MTA thread.

Differential Revision: https://phabricator.services.mozilla.com/D113560
2021-06-09 21:38:14 +00:00
Noemi Erli 90b8bc9a03 Backed out 4 changesets (bug 1707954) for causing bustages in rules.mk CLOSED TREE
Backed out changeset fa23f9293250 (bug 1707954)
Backed out changeset e1b37839487b (bug 1707954)
Backed out changeset f72b810472fd (bug 1707954)
Backed out changeset fb4829011104 (bug 1707954)
2021-06-10 00:29:29 +03:00
Aaron Klotz 2bac3c5a84 Bug 1707954: Part 3 - Add eager MTA creation to mscom::EnsureMTA; r=Jamie
* We make `EnsureMTA`'s default constructor `private`, and `ProcessRuntime` a friend.
  `ProcessRuntime` calls this to eagerly create the MTA.
* The default constructor uses the new-ish `CoIncrementMTAUsage` to create the
  MTA without requiring a dedicated thread (when available). Otherwise we
  fall back to the traditional method. In the latter case, we synchronously
  wait for the initialization to complete so that we are guaranteed to have
  an MTA when we return.
* Some minor refactoring to make it easier to do the sync wait in the
  default constructor. I also renamed a couple of things just to make them
  more clear.

Differential Revision: https://phabricator.services.mozilla.com/D113562
2021-06-09 20:28:06 +00:00
Aaron Klotz e6aba31a8f Bug 1707954: Part 1 - Change mscom::ProcessRuntime to ensure MTA creation during startup; r=Jamie
This patch does the following:

* General cleanup:
  * More explicit restrictions of how/when the various constructors are available.
  * `InitializeSecurity` is made `static`, since it doesn't really manipulate instance variables.
  * We move some logic for resolving `CoInitializeEx` flags into `GetDesiredApartmentType`.
* Addition of `PostInit`:
  * This doesn't do anything at the moment, but since I'm already making a bunch
    of changes, I wanted to add this too. `PostInit` is a static method that
    is invoked once the `ProcessRuntime` is finished initializing, and, when
    present, the sandbox is fully enabled.
* We call `EnsureMTA`'s default constructor to eagerly bring up the MTA. This
  causes all background threads to implicitly become members of the MTA, which
  means that we can eliminate `CoInitializeEx` calls throughout our codebase,
  since they're slow and most developers do not have a clear understanding of
  what those functions actually do.
  * This also simplifies the COM initialization in sandboxed content processes
    with Win32K lockdown, since if our main thread is in the implicit MTA, we
    can immediately initialize ourselves without needing to punt that work
    over to the persistent MTA thread.

Differential Revision: https://phabricator.services.mozilla.com/D113560
2021-06-09 20:28:05 +00:00
Nika Layzell 1aaeb179e2 Bug 1715144 - Part 1: Stop adding /ipc/glue to LOCAL_INCLUDES when including chromium-config.mozbuild, r=ipc-reviewers,necko-reviewers,mccr8,valentin
Differential Revision: https://phabricator.services.mozilla.com/D117103
2021-06-09 04:56:48 +00:00
Yaron Tausky dde1fe54eb Bug 1496997 - Remove a chunk of child intercept code from dom/serviceworkers r=asuth,dom-workers-and-storage-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D101632
2021-06-08 21:02:54 +00:00
Andreas Farre 03d1f5a511 Bug 1710004 - Part 2: Make it possible to pre load data into BackgroundSessionStorageManager. r=asuth
This makes it possible to do the session storage restoration for
session restore from the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D116007
2021-06-08 13:42:33 +00:00
Nika Layzell d3e5a4039d Bug 1713294 - Use atomics for Unsound_IsClosed and Unsound_NumQueuedMessages, r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D117039
2021-06-07 22:00:35 +00:00
Rob Lemley c11976792a Bug 1714658 - Add missing nsString include to process_util_linux.cc. r=gsvelto
Fixes coverage builds (--enable-coverage) when MOZ_ENABLE_FORKSERVER is not
set. This is the case for Thunderbird.

Differential Revision: https://phabricator.services.mozilla.com/D116885
2021-06-07 14:29:12 +00:00
Tim Huang d7220a241a Bug 1706615 - Part 1: Add a UnstrippedURI into the LoadInfo. r=valentin,necko-reviewers
This patch adds a UnstrippedURI into the LoadInfo. This attribute
represents the channel's URI has been stripped if this attributes is not
a nullptr.

Having this attribute allows us to be able to revert the query stripping
in the case where the loading channel is in the content blocking allow
list in the parent process.

In addition, this patch removes the main thread assertion in URIUtils
given that we've made the URL construction thread-safe. This will allow
us to be able to use nsIURI directly in ParentLoadInfoForwarderArgs.

Differential Revision: https://phabricator.services.mozilla.com/D116108
2021-06-02 19:46:19 +00:00
Andreas Farre 3dd66dc912 Part 9: Bug 1700623 - Notify main thread about storage updates periodically. r=asuth
This is used to update session store storage contents continuously.

Depends on D111435

Differential Revision: https://phabricator.services.mozilla.com/D114586
2021-05-26 07:14:07 +00:00
Andreas Farre 1e98905bd8 Part 6: Bug 1700623 - Add data querying to SessionStorageManager in parent process. r=nika,dom-storage-reviewers,asuth
To collect session storage data for session store, we make it possible
to query the background session storage managar for data.

Depends on D111432

Differential Revision: https://phabricator.services.mozilla.com/D111433
2021-05-26 07:14:05 +00:00
Olli Pettay e5eb74b09d Bug 1708042, add support for 'control' priority in ipdl, r=jld,ipc-reviewers
Depends on D115404

Differential Revision: https://phabricator.services.mozilla.com/D115405
2021-05-21 15:46:46 +00:00
Iulian Moraru e0b2722506 Backed out 3 changesets (bug 1708042) for causing wr failures on background-color-animation-in-body.html.
Backed out changeset f8febc2db198 (bug 1708042)
Backed out changeset a0fccd7121b5 (bug 1708042)
Backed out changeset ddc6d95f0601 (bug 1708042)
2021-05-21 16:39:38 +03:00
Alexandru Michis 84d8f14b41 Backed out 9 changesets (bug 1700623) for causing bc failures in browser_history_menu.js
CLOSED TREE

Backed out changeset 5eae296ad8b5 (bug 1700623)
Backed out changeset 97c3add3b00a (bug 1700623)
Backed out changeset 7ab483627a27 (bug 1700623)
Backed out changeset a4e673640de5 (bug 1700623)
Backed out changeset 513ea16be430 (bug 1700623)
Backed out changeset 88b4add342df (bug 1700623)
Backed out changeset c13bdee1b526 (bug 1700623)
Backed out changeset 26df421dac02 (bug 1700623)
Backed out changeset 6cd0b7a269e5 (bug 1700623)
2021-05-21 11:43:54 +03:00
Andreas Farre a0d376b551 Part 9: Bug 1700623 - Notify main thread about storage updates periodically. r=asuth
This is used to update session store storage contents continuously.

Depends on D111435

Differential Revision: https://phabricator.services.mozilla.com/D114586
2021-05-20 12:48:24 +00:00
Andreas Farre d1e7d2a409 Part 6: Bug 1700623 - Add data querying to SessionStorageManager in parent process. r=nika,dom-storage-reviewers,asuth
To collect session storage data for session store, we make it possible
to query the background session storage managar for data.

Depends on D111432

Differential Revision: https://phabricator.services.mozilla.com/D111433
2021-05-20 12:48:22 +00:00
Olli Pettay d147cf8e03 Bug 1708042, add support for 'control' priority in ipdl, r=jld,ipc-reviewers
Depends on D115404

Differential Revision: https://phabricator.services.mozilla.com/D115405
2021-05-20 12:42:31 +00:00
Dorel Luca 3416acf7b4 Backed out changeset af367782bea4 (bug 1677509) for multipe failures. CLOSED TREE 2021-05-20 02:26:36 +03:00
Doug Thayer 3a691cdda6 Bug 1677509 - Use GetQueuedCompletionStatusEx in win message pump r=handyman
This is almost certainly a very small optimization, and likely won't address
the frequency of hangs from bug 1677509. However, it still should be an
improvement, and will work on anything Vista or later.

We observed as part of trying to diagnose the somewhat mysterious bug 1677509
that sometimes multiple messages would be queued, and yet the IPC I/O thread
would go idle in between servicing them in GetQueuedCompletionStatusEx. Given
that we send frequent sync ipc messages for mouse move events, it seems prudent
to be able to service multiple at a time.

Differential Revision: https://phabricator.services.mozilla.com/D114287
2021-05-19 21:44:36 +00:00
Paul Bone 782bfdaa70 Bug 1710989 - Apply linter fixes in IdleScheduler code r=smaug DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D115328
2021-05-19 02:30:24 +00:00
Nika Layzell 2bec103be8 Bug 1708500 - Reduce the size of ManagedContainer types, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D114786
2021-05-17 20:53:51 +00:00
Butkovits Atila b1cdcda434 Backed out changeset 0909ed8ac5a9 (bug 1707499) for causing multiple failures. CLOSED TREE 2021-05-13 06:49:49 +03:00
Paul Bone 4abb3dad5a Bug 1707499 - Fix uninitialised member r=jld
Differential Revision: https://phabricator.services.mozilla.com/D113470
2021-05-13 03:07:40 +00:00
Nicolas B. Pierron a4aef929a1 Bug 1698045 part 1 - Add xpc::SelfHostedShmem to hold shared memory for JS initialization. r=smaug,tcampbell,ipc-reviewers,jld
This change adds the ground work to share content provided by the JS engine of
the Parent process to initialize the JS engine of other threads and Content
processes.

The singleton class xpc::SelfHostedShmem is used to wrap the logic behind
holding the memory. The memory is initialized with `InitFromParent` or
`InitFromChild`. The memory is accessible using either the `Content` or
`Handle`.

The shared memory is transfered through the command line using
`mozilla::ipc::ExportSharedJSInit` and read using
`mozilla::ipc::ImportSharedJSInit` functions. The command line is used, as we
need the shared memory to be avilable for the JS engine initialization. The
command line is composed of a single command named `-jsInit` which is followed
by the handle (on Windows) and the length of the shared content.

The memory associated with the shared memory is cleared in `ShutdownXPCOM` after
closing all threads, and shuting down the JS engine. This is necessary as we
expect the JS engine to borrow content from the shared memory.

Differential Revision: https://phabricator.services.mozilla.com/D110576
2021-05-12 13:57:55 +00:00
Paul Bone 1aec99356d Bug 1629064 - pt 10. Add telemetry r=smaug
We'd like to know if there are any problems with starving content processes
of cleaning up memory in a timely way.  Add some telemetry to get a sense of
this.

Differential Revision: https://phabricator.services.mozilla.com/D113275
2021-05-12 06:46:11 +00:00
Paul Bone 883b7bec01 Bug 1629064 - pt 4. Add a pref for the maximum number of concurrent GCs r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D105957
2021-05-12 06:46:09 +00:00
Paul Bone 689964900f Bug 1629064 - pt 1. Add IdleScheduler messages for GC r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D100857
2021-05-12 06:46:08 +00:00
Andi-Bogdan Postelnicu eab549fd19 Bug 1519636 - Initial reformat of C/C++ code with clang-format version 12.0.0. r=sylvestre
clang-format version 12.0.0 (taskcluster-KEgO7qdgQ8uaewA6NkRnRA)

Differential Revision: https://phabricator.services.mozilla.com/D114211
2021-05-10 07:15:07 +00:00
Nika Layzell ef4c757f2c Bug 1709893 - Part 3: Remove unused method from ChildProcessHost, r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D114521
2021-05-07 13:56:51 +00:00
Nika Layzell fb7aa3514e Bug 1709893 - Part 2: Add missing nsPrintfCString.h include, r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D114520
2021-05-07 13:56:51 +00:00
Bob Owen 3f33576cea Bug 1385014: Use WaitForSingleObjectEx in WaitForSyncNotifyWithA11yReentry when win32k is disabled. r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D113568
2021-05-06 11:10:20 +00:00
Calixte Denizet d1be9b3b85 Bug 1685505 - When env GCOV_CHILD_PREFIX is set then generate gcdas for each process in different directories (named in appending their pid). r=marco
In order to avoid concurrency issues when dumping or to be able to have a ccov report per process, when GCOV_CHILD_PREFIX is set, set child processes' GCOV_PREFIX to GCOV_CHILD_PREFIX + child process PID

Differential Revision: https://phabricator.services.mozilla.com/D114239
2021-05-04 16:34:27 +00:00
Jed Davis 74cfb39ab2 Bug 1706526 - Check for failure to duplicate shared memory file descriptors. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D113139
2021-04-30 00:03:23 +00:00
David Parks c99bc3e206 Bug 1704658: Implement ParamTraits for RefPtr<nsAtom> r=nika
Serialization for both nsStaticAtoms and nsDynamicAtoms.

Differential Revision: https://phabricator.services.mozilla.com/D112433
2021-04-27 08:20:18 +00:00
Edgar Chen 58fea44e06 Bug 1672726 - Part 2: Support dispatching synthesized touch events through parent process; r=ipc-reviewers,botond,nika
in order to support dispatching synthesized touch events to fission oop iframe.

Depends on D112127

Differential Revision: https://phabricator.services.mozilla.com/D112128
2021-04-22 16:01:26 +00:00
Nika Layzell e983da120a Bug 1706375 - Support building ipc/glue in non-unified mode, r=ipc-reviewers,mccr8
This both helps IDE integration and will help avoid build issues which would've
otherwise cropped up when adding new files to the directory for bug 1706374.

Differential Revision: https://phabricator.services.mozilla.com/D112764
2021-04-22 14:32:03 +00:00
Mitchell Hentges 50483887d0 Bug 1705444: Pipe IPDL test status to exit code r=sheehan
By returning non-zero when tests fail, `make` can pick up the failure.

Differential Revision: https://phabricator.services.mozilla.com/D112789
2021-04-21 15:34:42 +00:00
Sean Feng 56c1ae0d21 Bug 1705443 - Use vsync priority in PIntrPriority::Msg r=smaug
We've renamed the `high` priority to `vsync` in bug 1697585,
this is just adapting the change.

Differential Revision: https://phabricator.services.mozilla.com/D112198
2021-04-15 19:07:06 +00:00
Jed Davis a3ad179b67 Bug 1703191. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D111193
2021-04-14 23:38:31 +00:00
Sean Feng 6ba50278a7 Bug 1697585 - Rename high priority to vsync priority r=smaug
`High` priority is being used for vsync tasks, so we should rename it to
make it clear, and renaming it also makes our priority naming less
confusing.

Differential Revision: https://phabricator.services.mozilla.com/D109536
2021-04-14 19:56:42 +00:00
Christoph Kerschbaumer 7544c7f793 Bug 1703520: Remove unused bypassCORSChecks from Loadinfo r=necko-reviewers,robwu,sstreich
Differential Revision: https://phabricator.services.mozilla.com/D111091
2021-04-08 17:51:36 +00:00
Brad Werth 5073339ca7 WIP: Bug 1685183 Part 3: Remove remaining references to PluginInstanceChild. r=jgilbert
These references were left behind in the cleanup of the plugin code.

Differential Revision: https://phabricator.services.mozilla.com/D111197
2021-04-08 16:42:07 +00:00
Butkovits Atila 1557f3a480 Backed out 3 changesets (bug 1685183) for causing build bustages. CLOSED TREE
Backed out changeset bef089a9a5fa (bug 1685183)
Backed out changeset d9e2699b32c6 (bug 1685183)
Backed out changeset 083f895fddd9 (bug 1685183)
2021-04-08 06:48:02 +03:00
Brad Werth 430c8d503c Bug 1685183 Part 3: Remove remaining references to PluginInstanceChild. r=jgilbert
These references were left behind in the cleanup of the plugin code.

Depends on D101227

Differential Revision: https://phabricator.services.mozilla.com/D111197
2021-04-08 01:39:05 +00:00
David Parks 6b176f5987 Bug 1682030 - Remove NPAPI plugin process from GeckoChildProcess r=jld,gsvelto
Eliminates the NPAPI plugin process type from the GeckoChildProcess enum as part of NPAPI removal.  In order to avoid altering enum values when updating the process list, the GECKO_PROCESS_TYPE macro has been updated to include the desired enum value.  We want to resist altering the values as they need to be consistent e.g. in telemetry reports.

We also remove plugins from adjacent spots that need to maintain consistency with GeckoChildProcess -- most notably the nsICrashService.

Differential Revision: https://phabricator.services.mozilla.com/D108689
2021-04-06 19:28:20 +00:00
David Parks d06598d3f3 Bug 1682030 - Remove Windows NPAPI plugin proccess sandbox r=bobowen
Removes Windows NPAPI process sandboxing code, including the code to establish a viable temp directory that was accessible by the sandboxed process.

Differential Revision: https://phabricator.services.mozilla.com/D108688
2021-04-06 19:28:19 +00:00
David Parks 9032efe20c Bug 1682030 - Remove NPAPI plugin async rendering support r=bas,jgilbert,ipc-reviewers,mccr8
Removes async (windowless) NPAPI plugin rendering methods used to render a plugin to an offscreen surface in the GPU process.  None of this code is used since we have removed all NPAPI plugin support.

Differential Revision: https://phabricator.services.mozilla.com/D107152
2021-04-06 19:28:16 +00:00
David Parks 311a1c73dd Bug 1682030 - Remove some dead NPAPI code from dom/plugins and related spots. r=jmathies,mconley,ipc-reviewers,mccr8
This is the first of two patches in this series that removes a large amount of now dead code from dom/plugins as part of removing all NPAPI plugin support.  This patch removes re-entrancy guards we have for Windows OnPaint messages, as the guards were only needed for windowed plugins.

Differential Revision: https://phabricator.services.mozilla.com/D107144
2021-04-06 19:28:12 +00:00
David Parks 1ee7be383b Bug 1682030 - Remove OSX interposer. r=haik
Removes the mac plugin_interposer (and the related NSCursorInfo behavior), as part of removing all of NPAPI plugin support, since it has no other clients.

Differential Revision: https://phabricator.services.mozilla.com/D107142
2021-04-06 19:28:11 +00:00
David Parks d05df71761 Bug 1682030 - Remove PPluginWidget. r=jmathies,ipc-reviewers,nika
Removes the NPAPI plugin widget actor and its proxy, as part of removing all of NPAPI plugin support.

Differential Revision: https://phabricator.services.mozilla.com/D107141
2021-04-06 19:28:11 +00:00
David Parks 1c4f352164 Bug 1682030 - Remove PPluginSurface. r=jmathies,bas
Removes the PPluginSurface actor used for windowed plugins, as part of removing all of NPAPI plugin support.  SharedDIB is then unused and is also removed.

Differential Revision: https://phabricator.services.mozilla.com/D107140
2021-04-06 19:28:10 +00:00
Brindusan Cristian 972d8621c6 Backed out 5 changesets (bug 1697585) for causing build bustages on nsTimerImpl.h. CLOSED TREE
Backed out changeset e9e4a710e7d1 (bug 1697585)
Backed out changeset bc271f42bcb7 (bug 1697585)
Backed out changeset d8516aec6a5e (bug 1697585)
Backed out changeset 0b1bc6cb84af (bug 1697585)
Backed out changeset 074ebebaee27 (bug 1697585)
2021-04-06 17:45:02 +03:00
Sean Feng dae8c27301 Bug 1697585 - Rename high priority to vsync priority r=smaug
`High` priority is being used for vsync tasks, so we should rename it to
make it clear, and renaming it also makes our priority naming less
confusing.

Differential Revision: https://phabricator.services.mozilla.com/D109536
2021-04-06 13:10:50 +00:00
Csoregi Natalia d68661e2cc Backed out 24 changesets (bug 1682030) for bustage on ProcessHangMonitor.cpp and nsCOMPtr.h. CLOSED TREE
Backed out changeset 5b1644096477 (bug 1682030)
Backed out changeset 35ae60eea3c7 (bug 1682030)
Backed out changeset 3eca76a6d639 (bug 1682030)
Backed out changeset 259c45447ad9 (bug 1682030)
Backed out changeset de9222dc8c31 (bug 1682030)
Backed out changeset 2986c7e14349 (bug 1682030)
Backed out changeset 6af3410bdb93 (bug 1682030)
Backed out changeset 42b0621c2927 (bug 1682030)
Backed out changeset 366e3e371858 (bug 1682030)
Backed out changeset 9adb2865adea (bug 1682030)
Backed out changeset 6af6af3bc03a (bug 1682030)
Backed out changeset da94a91b35ae (bug 1682030)
Backed out changeset 9143da258d0e (bug 1682030)
Backed out changeset 5e20d06952ba (bug 1682030)
Backed out changeset 6253d7e1ce7d (bug 1682030)
Backed out changeset 0e06ddeea3e2 (bug 1682030)
Backed out changeset 9c58d57c9e44 (bug 1682030)
Backed out changeset e90edd89430e (bug 1682030)
Backed out changeset 5861b8166b10 (bug 1682030)
Backed out changeset b4b88cdc7993 (bug 1682030)
Backed out changeset b80054e9805c (bug 1682030)
Backed out changeset 580d857674c0 (bug 1682030)
Backed out changeset a9cdf93c2662 (bug 1682030)
Backed out changeset 9c9c8b4998e2 (bug 1682030)
2021-04-06 03:54:12 +03:00
David Parks 3f9c44a9ed Bug 1682030 - Remove NPAPI plugin process from GeckoChildProcess r=jld,gsvelto
Eliminates the NPAPI plugin process type from the GeckoChildProcess enum as part of NPAPI removal.  In order to avoid altering enum values when updating the process list, the GECKO_PROCESS_TYPE macro has been updated to include the desired enum value.  We want to resist altering the values as they need to be consistent e.g. in telemetry reports.

We also remove plugins from adjacent spots that need to maintain consistency with GeckoChildProcess -- most notably the nsICrashService.

Differential Revision: https://phabricator.services.mozilla.com/D108689
2021-04-05 23:48:43 +00:00
David Parks 4e9ed60079 Bug 1682030 - Remove Windows NPAPI plugin proccess sandbox r=bobowen
Removes Windows NPAPI process sandboxing code, including the code to establish a viable temp directory that was accessible by the sandboxed process.

Differential Revision: https://phabricator.services.mozilla.com/D108688
2021-04-05 23:48:43 +00:00
David Parks bd753c5ff6 Bug 1682030 - Remove NPAPI plugin async rendering support r=bas,jgilbert,ipc-reviewers,mccr8
Removes async (windowless) NPAPI plugin rendering methods used to render a plugin to an offscreen surface in the GPU process.  None of this code is used since we have removed all NPAPI plugin support.

Differential Revision: https://phabricator.services.mozilla.com/D107152
2021-04-05 23:48:40 +00:00
David Parks 3987158be1 Bug 1682030 - Remove some dead NPAPI code from dom/plugins and related spots. r=jmathies,mconley,ipc-reviewers,mccr8
This is the first of two patches in this series that removes a large amount of now dead code from dom/plugins as part of removing all NPAPI plugin support.  This patch removes re-entrancy guards we have for Windows OnPaint messages, as the guards were only needed for windowed plugins.

Differential Revision: https://phabricator.services.mozilla.com/D107144
2021-04-05 23:48:35 +00:00
David Parks 5a231c1001 Bug 1682030 - Remove OSX interposer. r=haik
Removes the mac plugin_interposer (and the related NSCursorInfo behavior), as part of removing all of NPAPI plugin support, since it has no other clients.

Differential Revision: https://phabricator.services.mozilla.com/D107142
2021-04-05 23:48:34 +00:00
David Parks 45f5dd79ff Bug 1682030 - Remove PPluginWidget. r=jmathies,ipc-reviewers,nika
Removes the NPAPI plugin widget actor and its proxy, as part of removing all of NPAPI plugin support.

Differential Revision: https://phabricator.services.mozilla.com/D107141
2021-04-05 23:48:34 +00:00
David Parks 97fe4ca26f Bug 1682030 - Remove PPluginSurface. r=jmathies,bas
Removes the PPluginSurface actor used for windowed plugins, as part of removing all of NPAPI plugin support.  SharedDIB is then unused and is also removed.

Differential Revision: https://phabricator.services.mozilla.com/D107140
2021-04-05 23:48:33 +00:00
Ryan VanderMeulen c8566ba9c7 Bug 1702244 - Don't try to use manifestPath if ACCESSIBILITY isn't set. r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D110416
2021-03-31 21:55:21 +00:00
Eden Chuang c7aa9a7c9c Bug 1696111 - Make LoadInfo know if the request is triggered from a media element and if it's an initial request. r=necko-reviewers,alwu,dragana
Differential Revision: https://phabricator.services.mozilla.com/D106890
2021-03-30 00:52:31 +00:00
Andrew Osmond e15e0ca584 Bug 1699224 - Part 2. Expose SharedMemoryBasic::Unmap for use by callers. r=jld
This patch exposes SharedMemoryBasic::Unmap for use by callers to allow
one to unmap memory out of our address space without destroying the
SharedMemoryBasic object itself. This will be used by later patches in
this series.

Differential Revision: https://phabricator.services.mozilla.com/D109438
2021-03-29 22:43:27 +00:00
Noemi Erli ebaee4ef03 Backed out 5 changesets (bug 1699224) for causing web platform and reftest failures CLOSED TREE
Backed out changeset bc232de0c5f8 (bug 1699224)
Backed out changeset 94c75dba6545 (bug 1699224)
Backed out changeset 206187cafb6f (bug 1699224)
Backed out changeset ef3ef367986e (bug 1699224)
Backed out changeset d2294fe6ef31 (bug 1699224)
2021-03-26 22:16:10 +02:00
Andrew Osmond a4cbd54fb5 Bug 1699224 - Part 2. Expose SharedMemoryBasic::Unmap for use by callers. r=jld
This patch exposes SharedMemoryBasic::Unmap for use by callers to allow
one to unmap memory out of our address space without destroying the
SharedMemoryBasic object itself. This will be used by later patches in
this series.

Differential Revision: https://phabricator.services.mozilla.com/D109438
2021-03-26 18:21:14 +00:00
Butkovits Atila a8a0f140d3 Backed out 5 changesets (bug 1699224) for causing build bustages on SharedSurfacesParent.cpp. CLOSED TREE
Backed out changeset f929f9783e61 (bug 1699224)
Backed out changeset 36bf68e01a50 (bug 1699224)
Backed out changeset 85f3499080db (bug 1699224)
Backed out changeset 8ce6ddf6ec6f (bug 1699224)
Backed out changeset f8b232382361 (bug 1699224)
2021-03-26 18:33:17 +02:00
Andrew Osmond 27147b39f9 Bug 1699224 - Part 2. Expose SharedMemoryBasic::Unmap for use by callers. r=jld
This patch exposes SharedMemoryBasic::Unmap for use by callers to allow
one to unmap memory out of our address space without destroying the
SharedMemoryBasic object itself. This will be used by later patches in
this series.

Differential Revision: https://phabricator.services.mozilla.com/D109438
2021-03-26 13:21:51 +00:00
Butkovits Atila ad9b1ed9d7 Backed out 12 changesets (bug 1683131, bug 1696111, bug 1695987) for causing crashes(Bug 1701151). a=backout
Backed out changeset 8ffef57e27d2 (bug 1683131)
Backed out changeset c02d5dc72abb (bug 1695987)
Backed out changeset 276f016ddc67 (bug 1683131)
Backed out changeset 2c7a45e20b50 (bug 1683131)
Backed out changeset 11fdb503d537 (bug 1696111)
Backed out changeset 2946eff1e9c8 (bug 1696111)
Backed out changeset e4d01b88e517 (bug 1696111)
Backed out changeset fab7f4cd445d (bug 1696111)
Backed out changeset d60c38f8939a (bug 1696111)
Backed out changeset 3fdc8089a46f (bug 1696111)
Backed out changeset 51a16dfabc98 (bug 1696111)
Backed out changeset 642bdd52fd57 (bug 1696111)
2021-03-26 11:30:28 +02:00
Eden Chuang 908b174731 Bug 1696111 - Make LoadInfo know if the request is triggered from a media element and if it's an initial request. r=necko-reviewers,alwu,dragana
Differential Revision: https://phabricator.services.mozilla.com/D106890
2021-03-25 12:09:40 +00:00
Simon Giesecke a598a0c7c5 Bug 1679522 - Use <> style for including windows system headers. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D98895
2021-03-25 10:19:44 +00:00
Simon Giesecke 613e20d136 Bug 1184468 - Use nsBaseHashtable::Values. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D108587
2021-03-24 17:56:49 +00:00
Simon Giesecke 4a308827e3 Bug 708901 - Migrate to nsTHashSet in ipc. r=ipc-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D109322
2021-03-24 17:56:48 +00:00
Csoregi Natalia f54ee076ae Backed out 13 changesets (bug 708901, bug 1184468) for causing build bustage on GeckoViewHistory.cpp. CLOSED TREE
Backed out changeset b1e4c01e63b8 (bug 708901)
Backed out changeset 37b52cce83c0 (bug 708901)
Backed out changeset eee75f33f060 (bug 708901)
Backed out changeset 479bf64c7986 (bug 708901)
Backed out changeset 15a8fb94d15d (bug 708901)
Backed out changeset be31ccd9a61d (bug 708901)
Backed out changeset fc54f4eaedd5 (bug 708901)
Backed out changeset 03c3a56c3d13 (bug 708901)
Backed out changeset 73f11d3c1298 (bug 708901)
Backed out changeset aed22fd80893 (bug 708901)
Backed out changeset 74d8249fbe7e (bug 708901)
Backed out changeset acb725eb3c1d (bug 1184468)
Backed out changeset 70f3ea6efec4 (bug 1184468)
2021-03-24 19:26:20 +02:00
Simon Giesecke b07f34785d Bug 708901 - Migrate to nsTHashSet in ipc. r=ipc-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D109322
2021-03-24 16:59:00 +00:00
Tom Ritter 93ca1b2915 Bug 1610570: Add a 'NoTaint=allvalid' attribute as well, and cut Gamepad over to it r=cmartin
Depends on D108247

Differential Revision: https://phabricator.services.mozilla.com/D108248
2021-03-23 18:26:30 +00:00
Tom Ritter a40387b8a8 Bug 1610570: Pass attributes through so lower.py can change code emission, and handle NoTaint r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D108246
2021-03-23 18:26:30 +00:00
Tom Ritter 7275e370ec Bug 1610570: Support the NoTaint attribute on method parameters with the passback value r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D108245
2021-03-23 18:26:29 +00:00
Noemi Erli cc4a17cea3 Backed out 4 changesets (bug 1610570) for causing lint failure in lower.py CLOSED TREE
Backed out changeset faf6f57c64eb (bug 1610570)
Backed out changeset ccc49e1fd15c (bug 1610570)
Backed out changeset 83b086da2960 (bug 1610570)
Backed out changeset c7f732f443b1 (bug 1610570)
2021-03-23 19:25:55 +02:00
Tom Ritter 6470917122 Bug 1610570: Add a 'NoTaint=allvalid' attribute as well, and cut Gamepad over to it r=cmartin
Depends on D108247

Differential Revision: https://phabricator.services.mozilla.com/D108248
2021-03-23 15:15:39 +00:00
Tom Ritter 7d3fa671f3 Bug 1610570: Pass attributes through so lower.py can change code emission, and handle NoTaint r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D108246
2021-03-23 15:15:38 +00:00
Tom Ritter 63f2838313 Bug 1610570: Support the NoTaint attribute on method parameters with the passback value r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D108245
2021-03-23 15:15:37 +00:00
Simon Giesecke 79fddefe02 Bug 708901 - Migrate to nsTHashSet in gfx/ipc. r=jrmuizel
Depends on D109316

Differential Revision: https://phabricator.services.mozilla.com/D109317
2021-03-23 10:36:37 +00:00
Cosmin Sabou b202667e72 Backed out 4 changesets (bug 1610570) for causing gamepad related bustages. CLOSED TREE
Backed out changeset 047120786a91 (bug 1610570)
Backed out changeset e2ef5d146d6a (bug 1610570)
Backed out changeset 6594ce800a6b (bug 1610570)
Backed out changeset 8d78b75b87fc (bug 1610570)
2021-03-22 20:57:04 +02:00
Tom Ritter 8a0b712b75 Bug 1610570: Add a 'NoTaint=allvalid' attribute as well, and cut Gamepad over to it r=cmartin
Differential Revision: https://phabricator.services.mozilla.com/D108248
2021-03-22 17:31:41 +00:00
Tom Ritter e453957de9 Bug 1610570: Pass attributes through so lower.py can change code emission, and handle NoTaint r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D108246
2021-03-22 17:31:40 +00:00
Tom Ritter a693f1a809 Bug 1610570: Support the NoTaint attribute on method parameters with the passback value r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D108245
2021-03-22 17:31:39 +00:00
Florian Quèze 8ad1e5d0aa Bug 1699742 - Remove MOZ_GECKO_PROFILER ifdefs that are no longer needed, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D109078
2021-03-22 16:29:52 +00:00
Nika Layzell bf27412e89 Bug 1563624 - Part 2: Automatically reject async IPC responses when the resolver is dropped, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D108868
2021-03-18 16:56:10 +00:00
Nika Layzell d43ea8e721 Bug 1563624 - Part 1: Add a weak reference variant of ActorLifecycleProxy for IPDL internal use, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D108867
2021-03-18 16:56:10 +00:00
Simon Giesecke 43b7a1eb09 Bug 1699098 - Avoid double hashtable lookup in generated RemoveManagee code. r=ipc-reviewers,jld
Differential Revision: https://phabricator.services.mozilla.com/D108768
2021-03-18 08:41:27 +00:00
Simon Giesecke 80fd24eaab Bug 1699100 - Remove unused code-emitting functions from lower.py. r=ipc-reviewers,jld
Differential Revision: https://phabricator.services.mozilla.com/D108771
2021-03-18 08:41:26 +00:00
Simon Giesecke b9621d6376 Bug 1695162 - Use range-based for instead of custom hashtable iterators. r=xpcom-reviewers,kmag
Differential Revision: https://phabricator.services.mozilla.com/D108585
2021-03-17 15:49:46 +00:00
Niklas Gögge ed5eaf624b Bug 1647128 - Detect webby navs caused by meta refreshes in IsUserTriggeredForSecFetchSite check r=necko-reviewers,ckerschb,valentin
Differential Revision: https://phabricator.services.mozilla.com/D108035
2021-03-17 11:42:55 +00:00
Jed Davis 2d6db34852 Bug 1690921 - Limit IPC `sendmsg` gather list sizes based on socket buffer capacity. r=mccr8,gcp
When setting up calls to `sendmsg` for IPC on Unix systems, we generate
`iovec`s for the entire message or until the `IOV_MAX` limit is reached,
whichever comes first.  However, messages can be very large (up to 256
MiB currently), while the OS socket buffer is relatively small (8KiB on
macOS and FreeBSD, ~200KiB on Linux).

This patch detects the socket buffer size with the `SO_SNDBUF` socket
option and cuts off the `iovec` array after it's reached; it also adjusts
the Linux sandbox policy to allow reading that value in all processes.

On my test machines this increases throughput on large messages by about
2.5x on macOS (from ~0.3 to ~0.7 GB/s), but on Linux the improvement is
only about 5% (most of the running time is spent elsewhere).

Differential Revision: https://phabricator.services.mozilla.com/D105852
2021-03-12 21:12:10 +00:00
Jed Davis 4e2cf97309 Bug 1690921 - Avoid quadratic runtime when building `sendmsg` gather lists for IPC. r=mccr8
Currently we walk through the entire list of not-yet-written IPC buffers
when building the gathered I/O list for `sendmsg`, to determine the
total remaining length of the messages, even after reaching the OS's
limit on how many `iovec`s it will accept in one call.

This patch halts the iteration when we reach the `iovec` limit, because
we don't need the exact length; it's sufficient to know whether the
entire message was written, which is impossible in that case.

This increases throughput on large messages by about 7x on macOS (from
~0.04 to ~0.3 GB/s) and 1.7x on Linux (from ~0.3 to ~0.5 GB/s), on my
test machines.  The effect is more significant on macOS because its
smaller socket buffer size (8kB vs.  ~200kB) means we spend more time
setting up the syscall per unit data copied; see also the next patch.

Differential Revision: https://phabricator.services.mozilla.com/D105851
2021-03-12 21:12:10 +00:00
Tom Ritter c744fc48da Bug 1698160: Add the magical incantation for running ipdl tests to the README r=mccr8 DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D108233
2021-03-12 18:55:21 +00:00
Tim Huang a39ff4c926 Bug 1687283 - Part 1: Add a flag 'needForCheckingAntiTrackingHeuristic' in loadInfo. r=kershaw,necko-reviewers
This patch adds a flag 'needForCheckingAntiTrackingHeuristic' in
loadInfo. This flag will be used for deciding if we need to check the
AntiTracking heuristic after the channel has been classified.

Differential Revision: https://phabricator.services.mozilla.com/D107047
2021-03-12 08:45:29 +00:00
Simon Giesecke ad01a10a3b Bug 1634281 - Use nsTHashMap instead of nsDataHashtable. r=xpcom-reviewers,necko-reviewers,jgilbert,nika,valentin
Note that this patch only transforms the use of the nsDataHashtable type alias
to a directly equivalent use of nsTHashMap. It does not change the specification
of the hash key type to make use of the key class deduction that nsTHashMap
allows for in some cases. That can be done in a separate step, but requires more
attention.

Differential Revision: https://phabricator.services.mozilla.com/D106008
2021-03-10 10:47:47 +00:00
Simon Giesecke 7c6ccbe4a8 Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-05 15:29:49 +00:00
Alexandru Michis 8c28934f09 Backed out changeset c6b72f3c76ba (bug 1676361) for causing bustages in nsSocketTransportService2.cpp
CLOSED TREE
2021-03-04 23:26:04 +02:00
Simon Giesecke e41d350c04 Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-04 17:30:48 +00:00
Noemi Erli 11891059f7 Backed out changeset 06452c4c828c (bug 1676361) for causing bustages CLOSED TREE 2021-03-04 19:13:56 +02:00
Simon Giesecke 6c371fcc1c Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-04 16:14:44 +00:00
smolnar 9f8b74a18d Backed out changeset 9062e17fe15c (bug 1676361) on devs request. CLOSED TREE 2021-03-04 16:51:21 +02:00
Simon Giesecke e1330cc8f0 Bug 1676361 - Move AutoEntryScript to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D97742
2021-03-04 14:32:15 +00:00
Butkovits Atila 7846407933 Backed out 4 changesets (bug 1658419) for causing failures at test_check_timestamp.html. CLOSED TREE
Backed out changeset d2688bd29cba (bug 1658419)
Backed out changeset 7db6f9ba1fe6 (bug 1658419)
Backed out changeset 8d3c6d538b7b (bug 1658419)
Backed out changeset 11e3f0658049 (bug 1658419)
2021-03-04 00:13:56 +02:00
Chris Martin 53cb70ea9c Bug 1658419 - Change PGamepadEventChannelParent to have a constructor r=handyman
PGamepadEventChannelParent will need to send an async message back to the
child with info about the new shared memory region upon creation.

The IPDL channel is not ready during allocation, so we need to defer
registering the actor with GamepadPlatformService until the IPDL
"RecvConstructor" message so the channel will be available.

This is just a straight refactor to prepare for the upcoming change.

Differential Revision: https://phabricator.services.mozilla.com/D105127
2021-03-03 18:26:47 +00:00
Bogdan Tara 3ee470dcbc Backed out 4 changesets (bug 1658419) for GamepadStateBroadcaster related bustage CLOSED TREE
Backed out changeset c3ea9e47f68c (bug 1658419)
Backed out changeset 6353d9bdcab7 (bug 1658419)
Backed out changeset e35d4c928753 (bug 1658419)
Backed out changeset cb43cbbe1371 (bug 1658419)
2021-03-03 02:09:50 +02:00