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

6528 Коммитов

Автор SHA1 Сообщение Дата
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
Chris Martin 0c5f377529 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-02 23:02:35 +00:00
Csoregi Natalia 0fd80946d2 Backed out 4 changesets (bug 1658419) for linux bustage on GamepadStateBroadcaster.cpp. CLOSED TREE
Backed out changeset 0cf10f5443cc (bug 1658419)
Backed out changeset 2b03fe79caef (bug 1658419)
Backed out changeset bbf68f57807b (bug 1658419)
Backed out changeset afb09833eddb (bug 1658419)
2021-03-02 03:17:56 +02:00
Chris Martin e23c08adc6 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-01 21:59:48 +00:00
Jens Stutte 1e19379853 Bug 1689953: Harmonize shutdown phase definitions across nsTerminator and AppShutdown r=dthayer,chutten
This patch wants to solve several quirks around the shutdown terminator.

 - Use the same shutdown phase definitions in AppShutdown and nsTerminator. This touches quite a few files.
 - Ensure that the terminator phase shift is handled before any shutdown observer notifications are sent and reduce its heartbeat duration.
 - Add missing phases to the shutdown telemetry.

Please note that this changes the unit of "tick" to 100ms rather than 1s.
As a side effect, we also remove the obsolete "shutdown-persist" context.

While the existing test coverage continues to prove the most important functions, we acknowledge the wish for better test coverage with [[ https://bugzilla.mozilla.org/show_bug.cgi?id=1693966 | bug 1693966 ]].

Differential Revision: https://phabricator.services.mozilla.com/D103626
2021-02-27 14:38:14 +00:00
Butkovits Atila bb3fe218a4 Backed out changeset be43a81b35f9 (bug 1689953) for causing failure at test_terminator_record.js. CLOSED TREE 2021-02-27 05:03:11 +02:00
Jens Stutte f6d52040b9 Bug 1689953: Harmonize shutdown phase definitions across nsTerminator and AppShutdown r=dthayer,chutten
This patch wants to solve several quirks around the shutdown terminator.

 - Use the same shutdown phase definitions in AppShutdown and nsTerminator. This touches quite a few files.
 - Ensure that the terminator phase shift is handled before any shutdown observer notifications are sent and reduce its heartbeat duration.
 - Add missing phases to the shutdown telemetry.

Please note that this changes the unit of "tick" to 100ms rather than 1s.
As a side effect, we also remove the obsolete "shutdown-persist" context.

While the existing test coverage continues to prove the most important functions, we acknowledge the wish for better test coverage with [[ https://bugzilla.mozilla.org/show_bug.cgi?id=1693966 | bug 1693966 ]].

Differential Revision: https://phabricator.services.mozilla.com/D103626
2021-02-26 21:33:29 +00:00
Simon Giesecke 9af107a839 Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.

Differential Revision: https://phabricator.services.mozilla.com/D105473
2021-02-26 09:11:46 +00:00
Simon Giesecke 4f75368dcb Bug 1691913 - Rename nsBaseHashtable::GetOrInsert(With) to LookupOrInsert(With). r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
The functions should be called "Lookup" rather than "Get" because they return
a DataType& (rather than UserDataType).

Differential Revision: https://phabricator.services.mozilla.com/D105472
2021-02-26 09:11:45 +00:00
Mike Hommey 3d4a5dfac9 Bug 1694901 - Generate ipdl headers more deterministically. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D106575
2021-02-26 04:23:44 +00:00
Jeff Muizelaar a38e77b0db Bug 1693661 - Use mozalloc_handle_oom instead of failing gracefully if we fail to allocate. r=jld
In bug 1691415 we're getting failures to deserialize. It would be
nice to move these closer to the source so that we can better understand
what's going on.

Differential Revision: https://phabricator.services.mozilla.com/D105688
2021-02-25 18:53:25 +00:00
Aaron Klotz 004362bf3e Bug 1690384: Propagate error information up through XPCOMGlueLoad and GetBootstrap; r=glandium
We know that some GV installations (particularly but not exlcusively Focus) are
failing to load `libxul.so` during early Gecko bootstrapping. Unfortunately
a boolean pass/fail result is not giving us sufficient information to be able to
properly troubleshoot this problem.

This patch adds `mozilla::Result`-based return values to `XPCOMGlueLoad` and
`GetBootstrap` in an effort to produce more actionable information about these
failures.

We include either a `nsresult` or, if the failure is rooted in a dynamic linker
failure, appropriate platform-specific error information:

* On Unix-based platforms, a `UniqueFreePtr<char>` containing the string from `dlerror(3)`;
* On Windows, the Win32 `DWORD` error code from `GetLastError()`.

For non-Android platforms, I updated them to handle the new return type, but
otherwise did not make any further changes.

For Android, we include the error information in the message string that we pass
into the Java `Exception` that is subsequently thrown.

Differential Revision: https://phabricator.services.mozilla.com/D104263
2021-02-23 23:25:22 +00:00
Florian Quèze b2650ad078 Bug 1693347 - Avoid including GeckoProfiler.h in generated cpp files when it is not going to be used, r=nika.
Differential Revision: https://phabricator.services.mozilla.com/D105491
2021-02-18 11:56:20 +00:00
Jed Davis e0852b35ab Bug 1692631 - Fix the profiler marker for IPC message reception on Windows. r=gerald
This point in the code is the end of receiving a message, not the start
(note the `if (partial) { break; }` above), so it should be marked
accordingly.  The profiler frontend is expecting the end marker;
currently two of the four reported time intervals are `unknown` on
Windows, and this patch fixes that.

(Recording the receiving start time is complicated, because we don't
have a `Messsage` object until we've read the buffer with the (end of
the) header, and it might make more sense to timestamp it before the
first receive operation.  Currently, neither channel implementation
attempts this.)

Differential Revision: https://phabricator.services.mozilla.com/D105094
2021-02-16 22:51:30 +00:00
Jed Davis a2ac4377ec Bug 1692631 - Add only one sending start profiler marker per message on Windows. r=gerald
Currently, we add an `eSending`/`TransferStart` marker every time we
send data as part of a message, rather than only the first time.  The
profiler frontend appears to ignore the extra markers (the displayed time
intervals look reasonable), but it's wasteful: on large messages it can
consume enough CPU time to appear in the profile itself.

Differential Revision: https://phabricator.services.mozilla.com/D105093
2021-02-16 22:51:29 +00:00
Jed Davis 9f4a859e20 Bug 1692629 - Add profiler idleness annotations for IPC I/O thread on Windows. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D105092
2021-02-16 22:51:29 +00:00
Gerald Squelart 2416d881e2 Bug 1691589 - Reduce reliance on GeckoProfiler.h when only labels (and maybe markers) are needed - r=necko-reviewers,geckoview-reviewers,sg,agi,florian
There are no code changes, only #include changes.
It was a fairly mechanical process: Search for all "AUTO_PROFILER_LABEL", and in each file, if only labels are used, convert "GeckoProfiler.h" into "ProfilerLabels.h" (or just add that last one where needed).
In some files, there were also some marker calls but no other profiler-related calls, in these cases "GeckoProfiler.h" was replaced with both "ProfilerLabels.h" and "ProfilerMarkers.h", which still helps in reducing the use of the all-encompassing "GeckoProfiler.h".

Differential Revision: https://phabricator.services.mozilla.com/D104588
2021-02-16 04:44:19 +00:00
M. Sirringhaus 9ea20acd3b Bug 1666725 - Make gvfs e10s compatible r=valentin,necko-reviewers
Split channel into parent/child to be able to use dbus in the content sandbox

Differential Revision: https://phabricator.services.mozilla.com/D92206
2021-02-10 07:29:38 +00:00
Nika Layzell 86a03e6701 Bug 1689147 - Part 5: Change comparable to an extended attribute, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D103370
2021-02-09 16:50:23 +00:00
Nika Layzell 661b4db5f0 Bug 1689147 - Part 4: Switch nested and prio to extended attributes, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D103369
2021-02-09 16:50:22 +00:00
Nika Layzell b40f9a3000 Bug 1689147 - Part 3: Use extended attribute syntax for message modifiers, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D103368
2021-02-09 16:50:22 +00:00
Nika Layzell ff239c6313 Bug 1689147 - Part 2: Remove verify support from ipdl, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D103367
2021-02-09 16:50:21 +00:00
Nika Layzell 63fd915bfb Bug 1689147 - Part 1: Add extended attribute syntax to IPDL, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D103366
2021-02-09 16:50:21 +00:00
Andreea Pavel 74d8a6339f Backed out changeset 29cd566d3c08 (bug 1666725) for build bustages at PNecko.ipdl on a CLOSED TREE 2021-02-09 15:11:47 +02:00
M. Sirringhaus 86e1612919 Bug 1666725 - Make gvfs e10s compatible r=valentin,necko-reviewers
Split channel into parent/child to be able to use dbus in the content sandbox

Differential Revision: https://phabricator.services.mozilla.com/D92206
2021-02-09 12:52:22 +00:00
Eitan Isaacson b9559d486e Bug 1690342 - P3: Add protocol stubs for mac attributed text. r=Jamie,mccr8,ipc-reviewers DONTBUILD
Created DocAccessibleTypes.ipdlh to put common types so they can be used in platform
extension protocols.

Differential Revision: https://phabricator.services.mozilla.com/D103801
2021-02-08 23:26:39 +00:00
Nika Layzell c2f2f90cca Bug 1681529 - Part 5: Serialize `nsIInputStream` over IPC with aDelayedStart by default, r=baku
The current set of cases where a nsIInputStream is directly serialized over IPC
is fairly limited, and includes cases where the IPDL struct may be directly
stored within a content process, having the nsIInputStream left unused.

By switching this serialization to DelayedStart, we can avoid performing
unnecessary streaming copies of IPC data when sending postdata streams related
to session history and document navigation, while also avoiding issues like this
coming up again due to delayed start being the default.

Differential Revision: https://phabricator.services.mozilla.com/D101804
2021-02-04 18:13:07 +00:00
Nika Layzell 2f708ea97a Bug 1681529 - Part 4: Serialize aDelayedStart streams from parent to child as RemoteLazyInputStreams, r=baku
When aDelayedStart is specified, if the created IPCStream contains an internal
IPC stream actor, an actor is used under the hood to send raw data between
processes when needed. This is usually done to reduce overhead in cases where
the target process may not use the nsIInputStream immediately, if at all.

By switching to using RemoteLazyInputStream when sending DelayedStart actors
from parent to content, the amount of data sent in the initial payload is
reduced even further, and the stream is optimized to allow sending it back to
the parent process without streaming the data through the content process again.

Normal delayed start streams are still used when sending payloads from other
processes, as RemoteLazyInputStream is only supported for nsIInputStreams
originating in the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D101803
2021-02-04 18:13:05 +00:00
Nika Layzell 93bfa66c31 Bug 1681529 - Part 3: Apply InputStreamLengthWrapper after DelayedStartInputStream, r=baku
Previously, we would apply the InputStreamLengthWrapper before
DelayedStartInputStream, which meant that a stream serialized with aDelayedStart
would not correctly implement nsIInputStreamLength. By inverting the order of
these wrappers, the nsIInputStreamLength implementation is visible, without
impacting the functionality of the DelayedStartInputStream wrapper.

Differential Revision: https://phabricator.services.mozilla.com/D101802
2021-02-04 18:12:57 +00:00
Nika Layzell 91f9c9c927 Bug 1681529 - Part 1: Add a test for reloading a page with a large postdata payload, r=peterv
Without the other patches in this series, this test fails with both with and
without Fission enabled, for two different reasons.

With Fission disabled, the second reload request appears as empty, due to us
being unable to rewind the postData nsIInputStream. With Fission enabled, the
second reload request causes crashes due to the nsMIMEInputStream's invariant of
requiring a seekable stream is invalidated, causing the nsICloneableInputStream
implementation to misbehave.

Differential Revision: https://phabricator.services.mozilla.com/D101800
2021-02-04 18:12:52 +00:00
Bogdan Tara abc7c8eeee Backed out 11 changesets (bug 1681529) for talos crashes CLOSED TREE
Backed out changeset c87d0f32d7a6 (bug 1681529)
Backed out changeset b1269f35d525 (bug 1681529)
Backed out changeset 29df8d4c984a (bug 1681529)
Backed out changeset 4def7578ced0 (bug 1681529)
Backed out changeset ce57c5a26c25 (bug 1681529)
Backed out changeset 78b186ec645a (bug 1681529)
Backed out changeset b1d1550a66ca (bug 1681529)
Backed out changeset e8620622208a (bug 1681529)
Backed out changeset 636b1a7c13e4 (bug 1681529)
Backed out changeset a5a8eac68b87 (bug 1681529)
Backed out changeset 968e17db71df (bug 1681529)
2021-02-03 09:29:38 +02:00
Nika Layzell 6ba8b34b52 Bug 1681529 - Part 5: Serialize `nsIInputStream` over IPC with aDelayedStart by default, r=baku
The current set of cases where a nsIInputStream is directly serialized over IPC
is fairly limited, and includes cases where the IPDL struct may be directly
stored within a content process, having the nsIInputStream left unused.

By switching this serialization to DelayedStart, we can avoid performing
unnecessary streaming copies of IPC data when sending postdata streams related
to session history and document navigation, while also avoiding issues like this
coming up again due to delayed start being the default.

Differential Revision: https://phabricator.services.mozilla.com/D101804
2021-02-02 23:26:31 +00:00
Nika Layzell acbde6866d Bug 1681529 - Part 4: Serialize aDelayedStart streams from parent to child as RemoteLazyInputStreams, r=baku
When aDelayedStart is specified, if the created IPCStream contains an internal
IPC stream actor, an actor is used under the hood to send raw data between
processes when needed. This is usually done to reduce overhead in cases where
the target process may not use the nsIInputStream immediately, if at all.

By switching to using RemoteLazyInputStream when sending DelayedStart actors
from parent to content, the amount of data sent in the initial payload is
reduced even further, and the stream is optimized to allow sending it back to
the parent process without streaming the data through the content process again.

Normal delayed start streams are still used when sending payloads from other
processes, as RemoteLazyInputStream is only supported for nsIInputStreams
originating in the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D101803
2021-02-02 23:26:28 +00:00
Nika Layzell d03d88777e Bug 1681529 - Part 3: Apply InputStreamLengthWrapper after DelayedStartInputStream, r=baku
Previously, we would apply the InputStreamLengthWrapper before
DelayedStartInputStream, which meant that a stream serialized with aDelayedStart
would not correctly implement nsIInputStreamLength. By inverting the order of
these wrappers, the nsIInputStreamLength implementation is visible, without
impacting the functionality of the DelayedStartInputStream wrapper.

Differential Revision: https://phabricator.services.mozilla.com/D101802
2021-02-02 23:26:26 +00:00
Nika Layzell b227119f4b Bug 1681529 - Part 1: Add a test for reloading a page with a large postdata payload, r=peterv
Without the other patches in this series, this test fails with both with and
without Fission enabled, for two different reasons.

With Fission disabled, the second reload request appears as empty, due to us
being unable to rewind the postData nsIInputStream. With Fission enabled, the
second reload request causes crashes due to the nsMIMEInputStream's invariant of
requiring a seekable stream is invalidated, causing the nsICloneableInputStream
implementation to misbehave.

Differential Revision: https://phabricator.services.mozilla.com/D101800
2021-02-02 23:26:16 +00:00
Brindusan Cristian cbdb020883 Backed out 11 changesets (bug 1681529) for mochitest failures at test_reload_large_postdata.html. CLOSED TREE
Backed out changeset f1f988155c82 (bug 1681529)
Backed out changeset f0ba367de05e (bug 1681529)
Backed out changeset dbea9952ec79 (bug 1681529)
Backed out changeset 6e185ec2c4a4 (bug 1681529)
Backed out changeset d0b11c08666a (bug 1681529)
Backed out changeset f2515096b378 (bug 1681529)
Backed out changeset ecd8c3b8fdb4 (bug 1681529)
Backed out changeset 7ea2e9cc8bad (bug 1681529)
Backed out changeset dbc85d0bffaf (bug 1681529)
Backed out changeset f0893f544219 (bug 1681529)
Backed out changeset 91979e21aa8e (bug 1681529)
2021-02-02 22:02:59 +02:00
Nika Layzell 19d158a736 Bug 1681529 - Part 5: Serialize `nsIInputStream` over IPC with aDelayedStart by default, r=baku
The current set of cases where a nsIInputStream is directly serialized over IPC
is fairly limited, and includes cases where the IPDL struct may be directly
stored within a content process, having the nsIInputStream left unused.

By switching this serialization to DelayedStart, we can avoid performing
unnecessary streaming copies of IPC data when sending postdata streams related
to session history and document navigation, while also avoiding issues like this
coming up again due to delayed start being the default.

Differential Revision: https://phabricator.services.mozilla.com/D101804
2021-01-27 21:55:14 +00:00
Nika Layzell e5ea02d171 Bug 1681529 - Part 4: Serialize aDelayedStart streams from parent to child as RemoteLazyInputStreams, r=baku
When aDelayedStart is specified, if the created IPCStream contains an internal
IPC stream actor, an actor is used under the hood to send raw data between
processes when needed. This is usually done to reduce overhead in cases where
the target process may not use the nsIInputStream immediately, if at all.

By switching to using RemoteLazyInputStream when sending DelayedStart actors
from parent to content, the amount of data sent in the initial payload is
reduced even further, and the stream is optimized to allow sending it back to
the parent process without streaming the data through the content process again.

Normal delayed start streams are still used when sending payloads from other
processes, as RemoteLazyInputStream is only supported for nsIInputStreams
originating in the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D101803
2021-01-27 21:55:12 +00:00
Nika Layzell f9aa6b928e Bug 1681529 - Part 3: Apply InputStreamLengthWrapper after DelayedStartInputStream, r=baku
Previously, we would apply the InputStreamLengthWrapper before
DelayedStartInputStream, which meant that a stream serialized with aDelayedStart
would not correctly implement nsIInputStreamLength. By inverting the order of
these wrappers, the nsIInputStreamLength implementation is visible, without
impacting the functionality of the DelayedStartInputStream wrapper.

Differential Revision: https://phabricator.services.mozilla.com/D101802
2021-01-27 21:55:09 +00:00
Nika Layzell b3fac57b0f Bug 1681529 - Part 1: Add a test for reloading a page with a large postdata payload, r=peterv
Without the other patches in this series, this test fails with both with and
without Fission enabled, for two different reasons.

With Fission disabled, the second reload request appears as empty, due to us
being unable to rewind the postData nsIInputStream. With Fission enabled, the
second reload request causes crashes due to the nsMIMEInputStream's invariant of
requiring a seekable stream is invalidated, causing the nsICloneableInputStream
implementation to misbehave.

Differential Revision: https://phabricator.services.mozilla.com/D101800
2021-01-28 19:40:22 +00:00
Simon Giesecke 4cacf143a2 Bug 1689415 - Avoid UB when validating enum values in EnumSerializer. r=mccr8
Previously, there was undefined behaviour when validating enum values in
EnumSerializer, which were actually invalid (which was hit during fuzzing, e.g.),
because the invalid integral value was cast to the enum type for comparison.
This patch changes the comparison to cast the valid values to their integral
values instead and compare those.

Differential Revision: https://phabricator.services.mozilla.com/D103449
2021-02-02 18:04:05 +00:00
Florian Quèze 16c243e0de Bug 1641181 - Record sync IPC markers, r=mstange.
Differential Revision: https://phabricator.services.mozilla.com/D103335
2021-01-29 06:11:59 +00:00
Nika Layzell 0ee45e6357 Bug 1689182 - Collect content memory telemetry from the parent process, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D103239
2021-01-28 19:48:03 +00:00
Florian Quèze f447ef94de Bug 1688300 - Add 'Runnable' profiler markers showing when runnables are executed and a 'Task' label frame showing which tasks are started by TaskController, r=bas,gerald.
Differential Revision: https://phabricator.services.mozilla.com/D102803
2021-01-26 08:57:19 +00:00
Csoregi Natalia d97e4efd8e Backed out 9 changesets (bug 1681529) for causing bustage on TestSeekableStreamWrapper.cpp. CLOSED TREE
Backed out changeset 99d1c9682dc2 (bug 1681529)
Backed out changeset b562b6038855 (bug 1681529)
Backed out changeset 5a5f514a6cfe (bug 1681529)
Backed out changeset ceb55436928a (bug 1681529)
Backed out changeset 9852de883959 (bug 1681529)
Backed out changeset 1a33ea8b533d (bug 1681529)
Backed out changeset 3385635e9521 (bug 1681529)
Backed out changeset 49c28bfc4da4 (bug 1681529)
Backed out changeset 43cc14af229d (bug 1681529)
2021-01-25 23:40:44 +02:00
Nika Layzell b95186c4e1 Bug 1681529 - Part 5: Serialize `nsIInputStream` over IPC with aDelayedStart by default, r=baku
The current set of cases where a nsIInputStream is directly serialized over IPC
is fairly limited, and includes cases where the IPDL struct may be directly
stored within a content process, having the nsIInputStream left unused.

By switching this serialization to DelayedStart, we can avoid performing
unnecessary streaming copies of IPC data when sending postdata streams related
to session history and document navigation, while also avoiding issues like this
coming up again due to delayed start being the default.

Differential Revision: https://phabricator.services.mozilla.com/D101804
2021-01-20 16:20:11 +00:00
Nika Layzell f48d3f14bd Bug 1681529 - Part 4: Serialize aDelayedStart streams from parent to child as RemoteLazyInputStreams, r=baku
When aDelayedStart is specified, if the created IPCStream contains an internal
IPC stream actor, an actor is used under the hood to send raw data between
processes when needed. This is usually done to reduce overhead in cases where
the target process may not use the nsIInputStream immediately, if at all.

By switching to using RemoteLazyInputStream when sending DelayedStart actors
from parent to content, the amount of data sent in the initial payload is
reduced even further, and the stream is optimized to allow sending it back to
the parent process without streaming the data through the content process again.

Normal delayed start streams are still used when sending payloads from other
processes, as RemoteLazyInputStream is only supported for nsIInputStreams
originating in the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D101803
2021-01-20 16:20:34 +00:00
Nika Layzell 9715099994 Bug 1681529 - Part 3: Apply InputStreamLengthWrapper after DelayedStartInputStream, r=baku
Previously, we would apply the InputStreamLengthWrapper before
DelayedStartInputStream, which meant that a stream serialized with aDelayedStart
would not correctly implement nsIInputStreamLength. By inverting the order of
these wrappers, the nsIInputStreamLength implementation is visible, without
impacting the functionality of the DelayedStartInputStream wrapper.

Differential Revision: https://phabricator.services.mozilla.com/D101802
2021-01-20 16:21:07 +00:00
Nika Layzell 1aa0c7b19d Bug 1681529 - Part 1: Add a test for reloading a page with a large postdata payload, r=peterv
Without the other patches in this series, this test fails with both with and
without Fission enabled, for two different reasons.

With Fission disabled, the second reload request appears as empty, due to us
being unable to rewind the postData nsIInputStream. With Fission enabled, the
second reload request causes crashes due to the nsMIMEInputStream's invariant of
requiring a seekable stream is invalidated, causing the nsICloneableInputStream
implementation to misbehave.

Differential Revision: https://phabricator.services.mozilla.com/D101800
2021-01-20 16:17:15 +00:00