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

6528 Коммитов

Автор SHA1 Сообщение Дата
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
Nika Layzell 39d4397c40 Bug 1683490 - Make PBackground be a refcounted actor, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D102436
2021-01-21 16:26:50 +00:00
Deian Stefan 83f9e8ca5b Bug 1653659 - Part 2: Add support for Wasm sandboxing hunspell. r=firefox-build-system-reviewers,dmajor
Differential Revision: https://phabricator.services.mozilla.com/D86063
2021-01-14 20:12:19 +00:00
Masatoshi Kimura a29e207781 Bug 1685900 - Split internal and external contentPolicyType. r=ckerschb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D101271
2021-01-15 12:07:16 +00:00
Narcis Beleuzu 0322452233 Backed out changeset a52961071dcd (bug 1685900) for Build bustage in nsContentSecurityManager.cpp. CLOSED TREE 2021-01-15 04:04:37 +02:00
Masatoshi Kimura b384f14cde Bug 1685900 - Split internal and external contentPolicyType. r=ckerschb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D101271
2021-01-15 04:02:41 +02:00
Dorel Luca 9ed19e2828 Backed out changeset a52961071dcd (bug 1685900) for Build bustage in nsContentSecurityManager.cpp. CLOSED TREE 2021-01-15 02:45:34 +02:00
Masatoshi Kimura 87e50835c4 Bug 1685900 - Split internal and external contentPolicyType. r=ckerschb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D101271
2021-01-14 20:44:54 +00:00
Dorel Luca 869d44f53c Backed out 2 changesets (bug 1653659) for Build bustage in builds/worker/workspace/obj-build/dist/include/mozilla/rlbox/rlbox_type_traits.hpp. CLOSED TREE
Backed out changeset 783310e1f5b8 (bug 1653659)
Backed out changeset 876dfd999d65 (bug 1653659)
2021-01-14 22:09:18 +02:00
Deian Stefan 27b04de0f6 Bug 1653659 - Part 2: Add support for Wasm sandboxing hunspell. r=firefox-build-system-reviewers,dmajor
Differential Revision: https://phabricator.services.mozilla.com/D86063
2021-01-13 06:39:01 +00:00
Kartik Gautam 7ae6aea145 Bug 1684173 - Add newline character at end of files when missing r=sylvestre,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D100484
2021-01-07 08:53:08 +00:00
Sylvestre Ledru b58ddc19df Bug 1519636 - Reformat recent changes to the Google coding style r=andi
Updated with Debian clang-format version 11.0.1-1

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D100934
2021-01-06 17:17:23 +00:00
Paul Bone 71f32490f9 Bug 1683032 - Always check active count in IdleSchedulerParent r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D100301
2021-01-06 05:07:20 +00:00
Markus Stange 5cd8830a74 Bug 1683723 - Replace deprecated Cocoa enum constants with their modern replacements. r=spohl
I ran the following command:

```
rg -l 'NSAlphaShiftKeyMask' . | xargs sed -i '' -e 's/NSAlphaShiftKeyMask/NSEventModifierFlagCapsLock/g'
rg -l 'NSAlternateKeyMask' . | xargs sed -i '' -e 's/NSAlternateKeyMask/NSEventModifierFlagOption/g'
rg -l 'NSAnyEventMask' . | xargs sed -i '' -e 's/NSAnyEventMask/NSEventMaskAny/g'
rg -l 'NSApplicationDefined' . | xargs sed -i '' -e 's/NSApplicationDefined/NSEventTypeApplicationDefined/g'
rg -l 'NSBorderlessWindowMask' . | xargs sed -i '' -e 's/NSBorderlessWindowMask/NSWindowStyleMaskBorderless/g'
rg -l 'NSCenterTextAlignment' . | xargs sed -i '' -e 's/NSCenterTextAlignment/NSTextAlignmentCenter/g'
rg -l 'NSClosableWindowMask' . | xargs sed -i '' -e 's/NSClosableWindowMask/NSWindowStyleMaskClosable/g'
rg -l 'NSCommandKeyMask' . | xargs sed -i '' -e 's/NSCommandKeyMask/NSEventModifierFlagCommand/g'
rg -l 'NSCompositeCopy' . | xargs sed -i '' -e 's/NSCompositeCopy/NSCompositingOperationCopy/g'
rg -l 'NSControlKeyMask' . | xargs sed -i '' -e 's/NSControlKeyMask/NSEventModifierFlagControl/g'
rg -l 'NSDeviceIndependentModifierFlagsMask' . | xargs sed -i '' -e 's/NSDeviceIndependentModifierFlagsMask/NSEventModifierFlagDeviceIndependentFlagsMask/g'
rg -l 'NSFlagsChanged' . | xargs sed -i '' -e 's/NSFlagsChanged/NSEventTypeFlagsChanged/g'
rg -l 'NSFullScreenWindowMask' . | xargs sed -i '' -e 's/NSFullScreenWindowMask/NSWindowStyleMaskFullScreen/g'
rg -l 'NSFullSizeContentViewWindowMask' . | xargs sed -i '' -e 's/NSFullSizeContentViewWindowMask/NSWindowStyleMaskFullSizeContentView/g'
rg -l 'NSFunctionKeyMask' . | xargs sed -i '' -e 's/NSFunctionKeyMask/NSEventModifierFlagFunction/g'
rg -l 'NSHelpKeyMask' . | xargs sed -i '' -e 's/NSHelpKeyMask/NSEventModifierFlagHelp/g'
rg -l 'NSKeyDown' . | xargs sed -i '' -e 's/NSKeyDown/NSEventTypeKeyDown/g'
rg -l 'NSKeyUp' . | xargs sed -i '' -e 's/NSKeyUp/NSEventTypeKeyUp/g'
rg -l 'NSLeftMouseDownMask' . | xargs sed -i '' -e 's/NSLeftMouseDownMask/NSEventMaskLeftMouseDown/g'
rg -l 'NSLeftMouseDown' . | xargs sed -i '' -e 's/NSLeftMouseDown/NSEventTypeLeftMouseDown/g'
rg -l 'NSLeftMouseDragged' . | xargs sed -i '' -e 's/NSLeftMouseDragged/NSEventTypeLeftMouseDragged/g'
rg -l 'NSLeftMouseUp' . | xargs sed -i '' -e 's/NSLeftMouseUp/NSEventTypeLeftMouseUp/g'
rg -l 'NSMiniaturizableWindowMask' . | xargs sed -i '' -e 's/NSMiniaturizableWindowMask/NSWindowStyleMaskMiniaturizable/g'
rg -l 'NSMiniControlSize' . | xargs sed -i '' -e 's/NSMiniControlSize/NSControlSizeMini/g'
rg -l 'NSMouseEntered' . | xargs sed -i '' -e 's/NSMouseEntered/NSEventTypeMouseEntered/g'
rg -l 'NSMouseExited' . | xargs sed -i '' -e 's/NSMouseExited/NSEventTypeMouseExited/g'
rg -l 'NSMouseMoved' . | xargs sed -i '' -e 's/NSMouseMoved/NSEventTypeMouseMoved/g'
rg -l 'NSNumericPadKeyMask' . | xargs sed -i '' -e 's/NSNumericPadKeyMask/NSEventModifierFlagNumericPad/g'
rg -l 'NSOtherMouseDownMask' . | xargs sed -i '' -e 's/NSOtherMouseDownMask/NSEventMaskOtherMouseDown/g'
rg -l 'NSOtherMouseDown' . | xargs sed -i '' -e 's/NSOtherMouseDown/NSEventTypeOtherMouseDown/g'
rg -l 'NSOtherMouseDragged' . | xargs sed -i '' -e 's/NSOtherMouseDragged/NSEventTypeOtherMouseDragged/g'
rg -l 'NSOtherMouseUp' . | xargs sed -i '' -e 's/NSOtherMouseUp/NSEventTypeOtherMouseUp/g'
rg -l 'NSRegularControlSize' . | xargs sed -i '' -e 's/NSRegularControlSize/NSControlSizeRegular/g'
rg -l 'NSResizableWindowMask' . | xargs sed -i '' -e 's/NSResizableWindowMask/NSWindowStyleMaskResizable/g'
rg -l 'NSRightMouseDown' . | xargs sed -i '' -e 's/NSRightMouseDown/NSEventTypeRightMouseDown/g'
rg -l 'NSRightMouseDragged' . | xargs sed -i '' -e 's/NSRightMouseDragged/NSEventTypeRightMouseDragged/g'
rg -l 'NSRightMouseUp' . | xargs sed -i '' -e 's/NSRightMouseUp/NSEventTypeRightMouseUp/g'
rg -l 'NSRightTextAlignment' . | xargs sed -i '' -e 's/NSRightTextAlignment/NSTextAlignmentRight/g'
rg -l 'NSScrollWheelMask' . | xargs sed -i '' -e 's/NSScrollWheelMask/NSEventMaskScrollWheel/g'
rg -l 'NSScrollWheel' . | xargs sed -i '' -e 's/NSScrollWheel/NSEventTypeScrollWheel/g'
rg -l 'NSShiftKeyMask' . | xargs sed -i '' -e 's/NSShiftKeyMask/NSEventModifierFlagShift/g'
rg -l 'NSSmallControlSize' . | xargs sed -i '' -e 's/NSSmallControlSize/NSControlSizeSmall/g'
rg -l 'NSTabletPointEventSubtype' . | xargs sed -i '' -e 's/NSTabletPointEventSubtype/NSEventSubtypeTabletPoint/g'
rg -l 'NSTitledWindowMask' . | xargs sed -i '' -e 's/NSTitledWindowMask/NSWindowStyleMaskTitled/g'
```

Then I removed changes to third-party webrtc code, removed a comment in accessible/mac/mozAccessible.mm,
and performed some manual replacements in native_mouse_mac_window.xhtml.

Differential Revision: https://phabricator.services.mozilla.com/D100260
2021-01-05 21:17:11 +00:00
Eitan Isaacson ca8fda7434 Bug 1681909 - P1: Add IPC stubs for ApplyPostSearchFilter. r=morgan,ipc-reviewers,mccr8
Applying a bulk filter on accessibles in content process allows us to avoid a potentially large (and variable) number of IPC sync calls to retrieve the accessible names. I chose to implement this as a "post filter" and not to actually do the entire search in content because it would cause a lot of duplication of code for non-IPC searching, and we wouldn't have the flexibility to combine a text search with any arbitrary search key as the API requires.

I also generalized the RangeTypes.h header to PlatformExtTypes so it can be used to define filter types as well.

Differential Revision: https://phabricator.services.mozilla.com/D100730
2021-01-05 20:35:22 +00:00
Cosmin Sabou 2978aa00a3 Backed out changeset dbed1cdf588f (bug 1684173) for mochitest plain and devtools failures. a=backout DONTBUILD 2020-12-28 00:43:51 +02:00
Kartik Gautam 775cdec032 Bug 1684173 - Add newline character at end of files when missing r=sylvestre
Depends on D100443

Differential Revision: https://phabricator.services.mozilla.com/D100484
2020-12-27 11:43:41 +00:00
Masayuki Nakano 44dced1d87 Bug 1683226 - part 13: Get rid of `nsIWidget::StartPluginFocused()` r=m_kato,ipc-reviewers,mccr8
Depends on D100386

Differential Revision: https://phabricator.services.mozilla.com/D100387
2020-12-24 02:46:46 +00:00
Paul Bone 81d936b141 Bug 1683031 - pt 5. Add an assertion and document idle request IDs r=smaug
Add assertions and comments to explain the behaviour/use of the idle request
IDs.

Depends on D99330

Differential Revision: https://phabricator.services.mozilla.com/D100300
2020-12-22 17:56:46 +00:00
Paul Bone df9efaa79e Bug 1683031 - pt 4. IdleScheduler may now schedule multiple items from a loop r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D99330
2020-12-22 18:07:11 +00:00
Paul Bone 8a3d9b81f9 Bug 1683031 - pt 3. Use a single linked list for idle task queues r=smaug
This refactoring will make the following patches make more sense.

Differential Revision: https://phabricator.services.mozilla.com/D99329
2020-12-22 03:25:50 +00:00
Paul Bone 15aba2b8b9 Bug 1683031 - pt 2. Remove unused variable r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D97715
2020-12-22 03:25:47 +00:00
Paul Bone 3fa07a963a Bug 1683031 - pt 1. Fix some comments in IdleSchedulerParent.cpp r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D97714
2020-12-22 03:25:38 +00:00
Simon Giesecke 9758d919eb Bug 1583109 - Use StringJoin(Append) where easily possible. r=nika
Bug 1583109 introduced new function templates StringJoin and StringJoinAppend.
These are now used to replace several custom loops across the codebase that
implement string-joining algorithms to simplify the code.

Differential Revision: https://phabricator.services.mozilla.com/D98750
2020-12-17 14:58:18 +00:00
Masatoshi Kimura 3424a95ee0 Bug 1682103 - Make nsContentPolicyType a CEnum type. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D99580
2020-12-16 11:36:47 +00:00
Csoregi Natalia d8c9489b13 Backed out changeset 16d174e7c342 (bug 1583109) for bustage on nsReadableUtils.h. CLOSED TREE 2020-12-16 22:51:26 +02:00
Simon Giesecke 72babae175 Bug 1583109 - Use StringJoin(Append) where easily possible. r=nika
Bug 1583109 introduced new function templates StringJoin and StringJoinAppend.
These are now used to replace several custom loops across the codebase that
implement string-joining algorithms to simplify the code.

Differential Revision: https://phabricator.services.mozilla.com/D98750
2020-12-16 19:38:23 +00:00
Bryce Seager van Dyk 5c6194a73d Bug 1671246 - Use a union to pass NodeId in GMP. r=jbauman,ipc-reviewers,nika
Passing a union here allows us to reuse code and trim some code which was
duplicated to handle the different NodeId formats. This also consolidates the
former `NodeId` and `NodeIdData` structures into a new structure (working name
`NodeIdParts`) which represents parts that will later be converted to a string
based NodeId.

Differential Revision: https://phabricator.services.mozilla.com/D93569
2020-12-16 16:15:01 +00:00
Simon Giesecke 4cab6ac723 Bug 1677466 - Move ParamTraits specializations with extra dependencies out of IPCMessageUtils.h. r=mccr8
This moves parts of IPCMessageUtils.h to two new header files and adapts
the include directives as necessary. The new header files are:
- EnumSerializer.h, which defines the templates for enum serializers
- IPCMessageUtilsSpecializations.h, which defines template specializations
  of ParamTraits with extra dependencies (building upon both IPCMessageUtils.h
  and EnumSerializer.h)

This should minimize the dependencies pulled in by every consumer of
IPCMessageUtils.h

Differential Revision: https://phabricator.services.mozilla.com/D94459
2020-12-10 11:09:21 +00:00
Markus Stange f60ad7ffdd Bug 1679838 - Rename "Gecko_IOThread" to "IPC I/O Parent" and "Chrome_ChildThread" to "IPC I/O Child". r=jld
Depends on D97082

Differential Revision: https://phabricator.services.mozilla.com/D98210
2020-12-03 00:06:02 +00:00
Markus Stange ecf3a22d4d Bug 1677321 - Annotate the idle stack in MessagePumpLibevent::Run with the profiler IDLE category. r=jld
Also annotate non-idle work that's called inside MessagePumpLibevent::Run with
the OTHER category.

Differential Revision: https://phabricator.services.mozilla.com/D97082
2020-12-03 00:06:15 +00:00
Simon Giesecke 1c53236b70 Bug 1679272 - Include ScopeExit.h exactly where used. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D98888
2020-12-07 14:25:59 +00:00
Karl Tomlinson 88c7f3ad66 Bug 1119956 derive from DiscardableRunnable instead of CancelableRunnable when Cancel() is not supported r=asuth,sg
Differential Revision: https://phabricator.services.mozilla.com/D98118
2020-12-03 09:04:44 +00:00
Tom Tung 80a5716001 Bug 1656768 - Propagate SessionStorage data in BackgroundSessionStorageManager to the new top browsing context while replacing the top context id; r=nika,dom-workers-and-storage-reviewers,asuth
### Story

While the exisiting top browsing context is replaced, SessionStorage relies on
itself been propagated by SessionStore. However, this has been disabled in
SessionHistory in the parent process.

Therefore, we need to propagate SessionStorage data by propagating
BackgroundSessionStorageManager.

### Notes

This patch assumes that the target top-level browsing context shouldn't have
been registered to BackgroundSessionStorageManager. If this can happen, we will
either need to merge SessionStorage data into it or find a proper (earlier)
place to update sManagers.

### Test Plan

Test: D97763
Try: https://treeherder.mozilla.org/jobs?repo=try&revision=2acc7b393fb80b640f4fbe3ade1da7dd440c380e&selectedTaskRun=KK6XhR-sQuqv5lcntVLc2w.0

Differential Revision: https://phabricator.services.mozilla.com/D98082
2020-12-03 14:19:35 +00:00
Karl Tomlinson fe53cdd395 Bug 1119956 introduce DiscardableRunnable for tasks that might not run but might not implement cancellation r=asuth,sg
Classes that inherit from DiscardableRunnable are only promising that it is OK
for Run() to be skipped, rather than promising that Cancel() is effective.

Differential Revision: https://phabricator.services.mozilla.com/D98117
2020-12-02 09:36:25 +00:00
Robert Mader 529f433f65 Bug 1645528 - Connect nsRefreshDrivers in content processes with a widget-local vsync source r=mattwoodrow,emilio
To allow `requestAnimationFrame()` and similar things to run at monitor
speed if there is only a window-specific vsyncsource available.
This is the case for Wayland and, in the future, EGL/X11. Other backends
may opt for window specific vsyncsources as well at some point.

The idea is to, instead of using global vsync objects, expose a vsyncsource
from nsWindow and use it for refresh drivers. For the content process, move
VsyncChild to BrowserChild, so for each Browserchild there is only one
VsyncChild to which all refresh drivers connect.

IPC in managed either by PBrowser or PBackground. Right now, PBrowser is
only used on Wayland, as both PBrowser and the Wayland vsyncsource run
on the main thread. Other backends keep using the background thread for
now.

While at it, make it so that we constantly update the refresh rate. This
is necessary for Wayland, but also on other platforms variable refresh rates
are increasingly common. Do that by transimitting the vsync rate `SendNotify()`.

How to test:
 - run the Wayland backend
 - enable `widget.wayland_vsync.enabled`
 - optionally: disable `privacy.reduceTimerPrecision`
 - run `vsynctester.com` or `testufo.com`

Expected results:
Instead of fixed 60Hz, things should update at monitor refresh rate -
e.g. 144Hz

Original patch by Kenny Levinsen.

Depends on D98254

Differential Revision: https://phabricator.services.mozilla.com/D93173
2020-12-02 09:47:53 +00:00
Haik Aftandilian ba86698ecc Bug 1678445 - Crash related to Widevine playback on macOS 11 with Apples Silicon/arm64 r=jld,bryce
When using an x64 GMP child process with an arm64 parent process on arm64 Mac's, use a 16k Shmem pagesize in the child process.

Differential Revision: https://phabricator.services.mozilla.com/D98241
2020-12-01 19:05:20 +00:00
Thinker Li 56aff226ee Bug 1667183 - Restart fork server on error. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D91385
2020-12-01 13:43:52 +00:00
Narcis Beleuzu 012f0b504c Backed out 2 changesets (bug 1645528) for wdspec failures on user_prompts.py CLOSED TREE
Backed out changeset 986bd930bab7 (bug 1645528)
Backed out changeset 2fbe8c11cecb (bug 1645528)
2020-11-30 06:08:18 +02:00
Robert Mader 5ccb38b25c Bug 1645528 - Connect nsRefreshDrivers in content processes with a widget-local vsync source r=mattwoodrow,emilio
To allow `requestAnimationFrame()` and similar things to run at monitor
speed if there is only a window-specific vsyncsource available.
This is the case for Wayland and, in the future, EGL/X11. Other backends
may opt for window specific vsyncsources as well at some point.

The idea is to, instead of using global vsync objects, expose a vsyncsource
from nsWindow and use it for refresh drivers. For the content process, move
VsyncChild to BrowserChild, so for each Browserchild there is only one
VsyncChild to which all refresh drivers connect.

IPC in managed either by PBrowser or PBackground. Right now, PBrowser is
only used on Wayland, as both PBrowser and the Wayland vsyncsource run
on the main thread. Other backends keep using the background thread for
now.

While at it, make it so that we constantly update the refresh rate. This
is necessary for Wayland, but also on other platforms variable refresh rates
are increasingly common. Do that by transimitting the vsync rate `SendNotify()`.

How to test:
 - run the Wayland backend
 - enable `widget.wayland_vsync.enabled`
 - optionally: disable `privacy.reduceTimerPrecision`
 - run `vsynctester.com` or `testufo.com`

Expected results:
Instead of fixed 60Hz, things should update at monitor refresh rate -
e.g. 144Hz

Original patch by Kenny Levinsen.

Differential Revision: https://phabricator.services.mozilla.com/D93173
2020-11-29 19:13:40 +00:00
Bogdan Tara 7d0503248d Backed out 2 changesets (bug 1645528) for scroll related mochitest failures CLOSED TREE
Backed out changeset 08cd8d747c33 (bug 1645528)
Backed out changeset 4bc8953d9bed (bug 1645528)
2020-11-28 04:21:50 +02:00
Robert Mader 0d501f3c38 Bug 1645528 - Connect nsRefreshDrivers in content processes with a widget-local vsync source r=mattwoodrow,emilio
To allow `requestAnimationFrame()` and similar things to run at monitor
speed if there is only a window-specific vsyncsource available.
This is the case for Wayland and, in the future, EGL/X11. Other backends
may opt for window specific vsyncsources as well at some point.

The idea is to, instead of using global vsync objects, expose a vsyncsource
from nsWindow and use it for refresh drivers. For the content process, move
VsyncChild to BrowserChild, so for each Browserchild there is only one
VsyncChild to which all refresh drivers connect.

IPC in managed either by PBrowser or PBackground. Right now, PBrowser is
only used on Wayland, as both PBrowser and the Wayland vsyncsource run
on the main thread. Other backends keep using the background thread for
now.

While at it, make it so that we constantly update the refresh rate. This
is necessary for Wayland, but also on other platforms variable refresh rates
are increasingly common. Do that by transimitting the vsync rate `SendNotify()`.

How to test:
 - run the Wayland backend
 - enable `widget.wayland_vsync.enabled`
 - optionally: disable `privacy.reduceTimerPrecision`
 - run `vsynctester.com` or `testufo.com`

Expected results:
Instead of fixed 60Hz, things should update at monitor refresh rate -
e.g. 144Hz

Original patch by Kenny Levinsen.

Differential Revision: https://phabricator.services.mozilla.com/D93173
2020-11-27 23:33:18 +00:00
Noemi Erli c5213774a6 Backed out changeset 3a9dce735340 (bug 1645528) for causing crashes with nsRefreshDriver CLOSED TREE 2020-11-26 22:57:56 +02:00
Robert Mader a84aa40ad4 Bug 1645528 - Connect nsRefreshDrivers in content processes with a widget-local vsync source r=mattwoodrow,emilio
To allow `requestAnimationFrame()` and similar things to run at monitor
speed if there is only a window-specific vsyncsource available.
This is the case for Wayland and, in the future, EGL/X11. Other backends
may opt for window specific vsyncsources as well at some point.

The idea is to, instead of using global vsync objects, expose a vsyncsource
from nsWindow and use it for refresh drivers. For the content process, move
VsyncChild to BrowserChild, so for each Browserchild there is only one
VsyncChild to which all refresh drivers connect.

IPC in managed either by PBrowser or PBackground. Right now, PBrowser is
only used on Wayland, as both PBrowser and the Wayland vsyncsource run
on the main thread. Other backends keep using the background thread for
now.

While at it, make it so that we constantly update the refresh rate. This
is necessary for Wayland, but also on other platforms variable refresh rates
are increasingly common. When using PVsync, limit updates to once in every
250ms in order to minimize overhead while still updating fast.

How to test:
 - run the Wayland backend
 - enable `widget.wayland_vsync.enabled`
 - optionally: disable `privacy.reduceTimerPrecision`
 - run `vsynctester.com` or `testufo.com`

Expected results:
Instead of fixed 60Hz, things should update at monitor refresh rate -
e.g. 144Hz

Original patch by Kenny Levinsen.

Differential Revision: https://phabricator.services.mozilla.com/D93173
2020-11-26 19:15:04 +00:00
Narcis Beleuzu efbd3dc42f Backed out 2 changesets (bug 1645528) for leakcheck failures on nsTArray. CLOSED TREE
Backed out changeset df3577321bfe (bug 1645528)
Backed out changeset fbc13c3ea551 (bug 1645528)
2020-11-25 02:59:47 +02:00
Robert Mader d2fe090741 Bug 1645528 - Connect nsRefreshDrivers in content processes with a widget-local vsync source r=mattwoodrow,emilio
To allow `requestAnimationFrame()` and similar things to run at monitor
speed if there is only a window-specific vsyncsource available.
This is the case for Wayland and, in the future, EGL/X11. Other backends
may opt for window specific vsyncsources as well at some point.

The idea is to, instead of using global vsync objects, expose a vsyncsource
from nsWindow and use it for refresh drivers. For the content process, move
VsyncChild to BrowserChild, so for each Browserchild there is only one
VsyncChild to which all refresh drivers connect.

IPC in managed either by PBrowser or PBackground. Right now, PBrowser is
only used on Wayland, as both PBrowser and the Wayland vsyncsource run
on the main thread. Other backends keep using the background thread for
now.

While at it, make it so that we constantly update the refresh rate. This
is necessary for Wayland, but also on other platforms variable refresh rates
are increasingly common. When using PVsync, limit updates to once in every
250ms in order to minimize overhead while still updating fast.

How to test:
 - run the Wayland backend
 - enable `widget.wayland_vsync.enabled`
 - optionally: disable `privacy.reduceTimerPrecision`
 - run `vsynctester.com` or `testufo.com`

Expected results:
Instead of fixed 60Hz, things should update at monitor refresh rate -
e.g. 144Hz

Original patch by Kenny Levinsen.

Differential Revision: https://phabricator.services.mozilla.com/D93173
2020-11-24 23:47:54 +00:00
Narcis Beleuzu 0d0dc5c19a Backed out changeset 1f42c376724d (bug 1645528) for leakcheck failures on nsTArray. CLOSED TREE 2020-11-25 01:28:12 +02:00
Robert Mader 5f53d70c95 Bug 1645528 - Connect nsRefreshDrivers in content processes with a widget-local vsync source r=mattwoodrow,emilio
To allow `requestAnimationFrame()` and similar things to run at monitor
speed if there is only a window-specific vsyncsource available.
This is the case for Wayland and, in the future, EGL/X11. Other backends
may opt for window specific vsyncsources as well at some point.

The idea is to, instead of using global vsync objects, expose a vsyncsource
from nsWindow and use it for refresh drivers. For the content process, move
VsyncChild to BrowserChild, so for each Browserchild there is only one
VsyncChild to which all refresh drivers connect.

IPC in managed either by PBrowser or PBackground. Right now, PBrowser is
only used on Wayland, as both PBrowser and the Wayland vsyncsource run
on the main thread. Other backends keep using the background thread for
now.

While at it, make it so that we constantly update the refresh rate. This
is necessary for Wayland, but also on other platforms variable refresh rates
are increasingly common. When using PVsync, limit updates to once in every
250ms in order to minimize overhead while still updating fast.

How to test:
 - run the Wayland backend
 - enable `widget.wayland_vsync.enabled`
 - optionally: disable `privacy.reduceTimerPrecision`
 - run `vsynctester.com` or `testufo.com`

Expected results:
Instead of fixed 60Hz, things should update at monitor refresh rate -
e.g. 144Hz

Original patch by Kenny Levinsen.

Differential Revision: https://phabricator.services.mozilla.com/D93173
2020-11-24 22:20:35 +00:00
Magnus Melin 75d02b4702 Bug 1679148 - declare template for ParamTraits, so that Thunderbird builds succeed. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D97926
2020-11-24 14:44:29 +00:00
Simon Giesecke dd80614fa0 Bug 1678062 - Remove unnecessary includes. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D97467

Depends on D96561
2020-11-23 16:12:02 +00:00
Simon Giesecke d10d03d076 Bug 1676365 - Move SpinEventLoopUntil to separate header. r=#xpcom-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96556

Depends on D96554
2020-11-23 16:10:41 +00:00
Simon Giesecke ae75be244a Bug 1677466 - Split Endpoint.h and ProtocolMessageUtils.h from ProtocolUtils.h. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D93568

Depends on D93567
2020-11-23 16:06:42 +00:00
Simon Giesecke fdf6246294 Bug 1677466 - Remove unnecessary includes from MessageChannel.h and MessageLink.h. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D93567

Depends on D93564
2020-11-23 16:06:24 +00:00
Simon Giesecke dc800202a2 Bug 1660470 - Split SerializedStructuredCloneBuffer.h from IPCMessageUtils.h. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93550

Depends on D93546
2020-11-23 16:05:26 +00:00
Simon Giesecke 5b3084384e Bug 1660470 - Move void_t/null_t to a new IPCCore.h header. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93546

Depends on D93544
2020-11-23 16:05:20 +00:00
Simon Giesecke 16b9f61991 Bug 1660470 - Avoid including ProtocolUtils.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93544

Depends on D93543
2020-11-23 16:05:07 +00:00
Simon Giesecke c902104cdb Bug 1660470 - Split ShmemMessageUtils.h from Shmem.h. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93543

Depends on D93321
2020-11-23 16:05:02 +00:00
Simon Giesecke dfef212e61 Bug 1660470 - Move IPDLParamTraits for FileDescriptor out of FileDescriptor.h. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93321

Depends on D93248
2020-11-23 16:04:55 +00:00
Simon Giesecke c077183836 Bug 1660470 - Avoid including IPCMessageUtils.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93235

Depends on D93234
2020-11-23 16:03:47 +00:00
Simon Giesecke 93dd261db8 Bug 1660470 - Include C++ header files only from cpp file. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93233

Depends on D87865
2020-11-23 16:03:32 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Simon Giesecke 8953086494 Bug 1677284 - Move PackingStrategy::Variant implementation to separate header file. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D97075
2020-11-23 15:49:14 +00:00
Gerald Squelart a56d00ddb7 Bug 1678159 - Move WritePropertyTime to SpliceableJSONWriter::TimeProperty - r=gregtatum
TimeStamps in markers must now be streamed through `SpliceableJSONWriter::TimeProperty(name, timestamp)`.
This is consistent with all other JSON-writing functions being in `SpliceableJSONWriter` (and base class `JSONWriter`).

Depends on D97556

Differential Revision: https://phabricator.services.mozilla.com/D97557
2020-11-20 02:23:08 +00:00
Gerald Squelart 520450ccf0 Bug 1675406 - Don't record IPC markers if one of the profiler mutexes is locked on the current thread - r=canaltinova
Check `profiler_is_locked_on_current_thread()` before recording an IPC marker.

This removes the deadlock found in bug 1675406:
- SamplerThread: During sampling, some data is recorded into the profile buffer, which locks ProfileChunkedBuffer::mMutex, this triggers some chunk updates that are sent to ProfileBufferGlobalController, which attempts to lock its mutex.
- Main thread: An IPC with an update arrives, ProfileBufferGlobalController locks its mutex, then it sends an IPC out, this records a marker into ProfileChunkedBuffer, which attempts to lock its mMutex.
With this patch and bug 1671403, that last IPC will not record a marker anymore.

Differential Revision: https://phabricator.services.mozilla.com/D96971
2020-11-19 11:48:49 +00:00
Jean-Yves Avenard 66a250d472 Bug 1518344 - P1. Remove unnecessary promise allocation. r=jld
A MozPromise::Then() itself can be converted into a MozPromise.

Differential Revision: https://phabricator.services.mozilla.com/D96666
2020-11-12 23:17:21 +00:00
Gerald Squelart a10f7166db Bug 1675409 - Migrated TracingMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96053
2020-11-18 21:55:51 +00:00
Gerald Squelart bfc0fb9f6d Bug 1675409 - Migrated IPCMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96050
2020-11-18 21:52:41 +00:00
Razvan Maries b7eeb731df Backed out 23 changesets (bug 1675409) for build bustages on Preferences.cpp. CLOSED TREE
Backed out changeset c1a131a55767 (bug 1675409)
Backed out changeset 47d210802a5d (bug 1675409)
Backed out changeset e8ebb1c58d30 (bug 1675409)
Backed out changeset 69a1e9aeff2a (bug 1675409)
Backed out changeset 68f330b387a8 (bug 1675409)
Backed out changeset e4750d9ef5a1 (bug 1675409)
Backed out changeset bb6bb71e5ab3 (bug 1675409)
Backed out changeset 988d7f4716df (bug 1675409)
Backed out changeset ca41382e891c (bug 1675409)
Backed out changeset 90f3fbbbbeda (bug 1675409)
Backed out changeset 9b109d61a6f6 (bug 1675409)
Backed out changeset 3dd66abfdaa2 (bug 1675409)
Backed out changeset 44181df5f0db (bug 1675409)
Backed out changeset bb2603d947fc (bug 1675409)
Backed out changeset 97055cf20a56 (bug 1675409)
Backed out changeset f88fcf09de0d (bug 1675409)
Backed out changeset 7963e1c49786 (bug 1675409)
Backed out changeset 4c379c1061c3 (bug 1675409)
Backed out changeset b8be8ae7da63 (bug 1675409)
Backed out changeset 0b90aa89421e (bug 1675409)
Backed out changeset c10fb46467c9 (bug 1675409)
Backed out changeset 894ac233b290 (bug 1675409)
Backed out changeset 075d1d8e34c2 (bug 1675409)
2020-11-18 20:06:28 +02:00
Sylvestre Ledru bebb9f9181 Bug 1519636 - Reformat with clang-format-11 to the Google coding style r=andi,sg,geckoview-reviewers,snorp
It is bringing some minor changes

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D90795
2020-11-18 09:05:59 +00:00
Gerald Squelart 9506ea6302 Bug 1675409 - Migrated TracingMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96053
2020-11-17 22:25:06 +00:00
Gerald Squelart f17a3dc5aa Bug 1675409 - Migrated IPCMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96050
2020-11-17 22:22:01 +00:00
Mihai Alexandru Michis c0d25b01b2 Backed out 24 changesets (bug 1666566, bug 1675409) for causing hazard failures in profiler/core/platform.cpp
CLOSED TREE

Backed out changeset 4d8af8533fd4 (bug 1666566)
Backed out changeset f031a3a8a20f (bug 1675409)
Backed out changeset 2b7e1a031921 (bug 1675409)
Backed out changeset bda5a24b2d0a (bug 1675409)
Backed out changeset 4282e2284314 (bug 1675409)
Backed out changeset 0637f1b26e9f (bug 1675409)
Backed out changeset 67ae04c8f607 (bug 1675409)
Backed out changeset 6c7b3f3618ef (bug 1675409)
Backed out changeset 2f325c22d169 (bug 1675409)
Backed out changeset 1e48ff70ad8f (bug 1675409)
Backed out changeset 1dfc32d6871d (bug 1675409)
Backed out changeset 4f1f218a777b (bug 1675409)
Backed out changeset e6ac8722b38e (bug 1675409)
Backed out changeset cf132e15fb57 (bug 1675409)
Backed out changeset a126e6b00ba9 (bug 1675409)
Backed out changeset fbc7fbb04f33 (bug 1675409)
Backed out changeset 554c69681474 (bug 1675409)
Backed out changeset 44d0521c701f (bug 1675409)
Backed out changeset 04653dfe4720 (bug 1675409)
Backed out changeset 41ca2c043a00 (bug 1675409)
Backed out changeset 264ae4c805d4 (bug 1675409)
Backed out changeset 5f3bbdac0d52 (bug 1675409)
Backed out changeset 11311c11a6e8 (bug 1675409)
Backed out changeset 0355fbc44baf (bug 1675409)
2020-11-17 19:31:28 +02:00
Gerald Squelart e89990aa2c Bug 1675409 - Migrated TracingMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96053
2020-11-17 11:39:42 +00:00
Gerald Squelart 878bf41da1 Bug 1675409 - Migrated IPCMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96050
2020-11-17 11:36:32 +00:00
Sylvestre Ledru 0129dd3f83 Bug 1519636 - Reformat recent changes to the Google coding style r=andi,necko-reviewers,dragana
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D96608
2020-11-16 22:09:25 +00:00
Aaron Klotz dba13b1668 Bug 1674452: Add interface information to ORPC profiler markers; r=Jamie
* We add a new function to `mscom/Utils.h`: `DiagnosticNameForIID`. Its
  purpose is to generate a friendly name for an interface, given an IID.
  For special interfaces internal to COM, we add our own descriptive strings.
  If the interface does not have a description, we simply convert the IID
  to string format using GUIDToString.
* We modify `ProfilerMarkerChannelHook` to include the additional diagnostic
  information for IIDs in its markers.
* Since each marker is now differentiated by IID, we remove the restriction
  that we only use markers for the outermost COM call. In particular, this
  assumption doesn't hold for asynchronous COM calls, so we would be losing
  data in the case where an async call was pending while the main thread was
  still making COM calls on other interfaces.
  * There isn't really an effective way to distinguish between sync and
    async calls at the channel hook layer. I'm thinking about how we could
    perhaps modify `AsyncInvoker` to help mark these, but it's a bit messy.
    I'm going to postpone that to future work.
* Other potential future work is expanding the number of interfaces for which
  we have frendly names. I could see us annotating our various COM interfaces
  in a way that we could automagically generate human-readable descriptions for
  those interfaces.

Differential Revision: https://phabricator.services.mozilla.com/D97042
2020-11-16 19:50:42 +00:00
Aaron Klotz 3c1fe406d7 Bug 1677212: Improved aIsProxy handling within mscom::AsyncInvoker; r=Jamie
I realized that calling `mscom::IsProxy` is kind of redundant when we already
need to query for `ICallFactory`.

We still allow `aIsProxy` as an optional constructor argument, but if not
present then we go straight to `QueryInterface(IID_ICallFactory)`.

Differential Revision: https://phabricator.services.mozilla.com/D97047
2020-11-16 01:19:54 +00:00
Olli Pettay ba16304298 Bug 1676984 - Make IdleScheduler to use CollectProcessInfo to access cpucount, r=emalysz
Differential Revision: https://phabricator.services.mozilla.com/D96947
2020-11-13 22:10:18 +00:00
Jean-Yves Avenard 96a9f35dcd Bug 1672072 - P10. Promisify launch of RDD process and remove sync dispatch. r=mattwoodrow,bryce,mjf,padenot
Differential Revision: https://phabricator.services.mozilla.com/D96366
2020-11-13 04:21:16 +00:00
Jean-Yves Avenard 44ad5e249a Bug 1672072 - P9. Make EnsureRDDProcessAndCreateBridge an async API. r=mattwoodrow,bryce,mjf,padenot,ipc-reviewers,mccr8
We can now chaincreation of the decoder to the launch of the RDD process as needed and setting up the PRemoteDecoderManager

Differential Revision: https://phabricator.services.mozilla.com/D96365
2020-11-13 04:21:16 +00:00
Jean-Yves Avenard 6d2df84e41 Bug 1672072 - P8. Create decoder asynchronously. r=mattwoodrow,bryce,padenot,mjf,ipc-reviewers,mccr8
PDMFactory::CreateDecoder is changed to return a MozPromise that will contain the MediaDataDecoder once created.

This will allow to later make RemoteDecoderManager fully asynchronous and no longer require an IPC sync call to start the RDD process.

We also modify the WebrtcMediaDataDecoderCodec to never create a decoder on the main thread, which could cause deadlocks under some circumstances.

Differential Revision: https://phabricator.services.mozilla.com/D96364
2020-11-13 07:46:44 +00:00
Bogdan Tara 266d9ad46c Backed out 13 changesets (bug 1672072) for short.mp4.firstframe.html failures CLOSED TREE
Backed out changeset f093b7969e8b (bug 1672072)
Backed out changeset 28db8276ec2b (bug 1672072)
Backed out changeset ff8fe1b856b3 (bug 1672072)
Backed out changeset 091b9449c786 (bug 1672072)
Backed out changeset 89d9a12c0737 (bug 1672072)
Backed out changeset 9cb71fd4b43b (bug 1672072)
Backed out changeset 09adad7416e1 (bug 1672072)
Backed out changeset 9905650335ef (bug 1672072)
Backed out changeset 6f1d99e9c3a1 (bug 1672072)
Backed out changeset b59655b7a595 (bug 1672072)
Backed out changeset 1ef9d6d10508 (bug 1672072)
Backed out changeset fbf0b5117655 (bug 1672072)
Backed out changeset 65cd3b9de5c6 (bug 1672072)
2020-11-13 06:13:22 +02:00
Jean-Yves Avenard 4cbbb3b157 Bug 1672072 - P10. Promisify launch of RDD process and remove sync dispatch. r=mattwoodrow,bryce,mjf,padenot
Differential Revision: https://phabricator.services.mozilla.com/D96366
2020-11-12 22:53:59 +00:00
Jean-Yves Avenard 8ffdd4eaef Bug 1672072 - P9. Make EnsureRDDProcessAndCreateBridge an async API. r=mattwoodrow,bryce,mjf,padenot,ipc-reviewers,mccr8
We can now chaincreation of the decoder to the launch of the RDD process as needed and setting up the PRemoteDecoderManager

Differential Revision: https://phabricator.services.mozilla.com/D96365
2020-11-12 22:53:49 +00:00
Jean-Yves Avenard 7a6315ba80 Bug 1672072 - P8. Create decoder asynchronously. r=mattwoodrow,bryce,padenot,mjf,ipc-reviewers,mccr8
PDMFactory::CreateDecoder is changed to return a MozPromise that will contain the MediaDataDecoder once created.

This will allow to later make RemoteDecoderManager fully asynchronous and no longer require an IPC sync call to start the RDD process.

We also modify the WebrtcMediaDataDecoderCodec to never create a decoder on the main thread, which could cause deadlocks under some circumstances.

Differential Revision: https://phabricator.services.mozilla.com/D96364
2020-11-12 22:53:31 +00:00
Nika Layzell 630f9192f8 Bug 1676223 - Use ActorLifecycleProxy instead of WeakPtr for async returns, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D96454
2020-11-12 17:59:03 +00:00
Jan Varga 03e0a91794 Bug 1669437 - Add necessary infrastructure for independent in-memory only local storage database; r=asuth,dom-workers-and-storage-reviewers
The new infrastructure consists of a separate bridge between the content and the
parent process and a separate local storage database in the parent process.
The new infrastructure can be used for storing and sharing of private browsing
data across content processes.
This patch only creates necessary infrastructure, actual enabling of storing and
sharing of data across content processes will be done in a follow-up patch.

Differential Revision: https://phabricator.services.mozilla.com/D96562
2020-11-11 13:12:57 +00:00
Haik Aftandilian 0c4a7d9835 Bug 1675441 - Use an x64 Widevine GMP Process for Apple Silicon Native Builds r=bryce,spohl
When running as a "universal" build, use an x64 GMP child process if the CDM library is an x64 binary.

Use ifdefs extensively to reduce risk to Intel builds if the fix needs to be uplifted.

Requires a server-side balrog change to serve an Intel Widevine binary to ARM browser versions.

Differential Revision: https://phabricator.services.mozilla.com/D96288
2020-11-11 02:37:57 +00:00
Andreas Farre c208b33fc0 Bug 1646474 - Remove LoadInfo::mDocumentHasLoaded. r=nika,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96010
2020-11-10 12:45:22 +00:00
Markus Stange 81ba35b3f7 Bug 1675828 - Call OtherPidMaybeInvalid for the IPC marker because this code can run at times when the other pid is not known. r=jld
This avoids a crash from the MOZ_RELEASE_ASSERT in OtherPid() on Android.

Differential Revision: https://phabricator.services.mozilla.com/D96262
2020-11-10 01:45:51 +00:00
Brindusan Cristian 030df1b5cf Backed out changeset 98b994baee88 (bug 1676223) for build bustages at PChromiumCDMChild.cpp. CLOSED TREE 2020-11-10 01:59:18 +02:00
Nika Layzell 2d9159f48c Bug 1676223 - Use ActorLifecycleProxy instead of WeakPtr for async returns, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D96454
2020-11-09 23:29:20 +00:00
julianwels 2efbb0d597 Bug 1674926 - Collect telemetry for mixed display content upgrades. r=necko-reviewers,ckerschb,valentin
Differential Revision: https://phabricator.services.mozilla.com/D95921
2020-11-09 14:40:30 +00:00
Mike Hommey 53fee2f4c4 Bug 1675437 - Use preprocessor to create Info.plist files. r=firefox-build-system-reviewers,mhentges
While we're in the vicinity, change the manual preprocessing of
Info.plist.in to uses of the preprocessor.

Differential Revision: https://phabricator.services.mozilla.com/D96014
2020-11-05 15:03:47 +00:00
Mike Hommey ead183252e Bug 1675437 - Avoid using iconv to create InfoPlist.strings. r=firefox-build-system-reviewers,mhentges
Since python creates little-endian utf-16 consistently whether
cross-compiling from Linux or compiling natively on macOS, we could
write a small script that essentially replaces iconv. On the other hand,
we're also doing some manual preprocessing on the InfoPlist.strings.in
files, and we might as well use the preprocessor for that.

So, we augment the preprocessor to allow an explicit output encoding
other than utf-8, and use the preprocessor instead of `sed | iconv`.

Differential Revision: https://phabricator.services.mozilla.com/D96013
2020-11-05 15:07:30 +00:00
Aaron Klotz 0a1730e26a Bug 1675118: Add a variant of mscom::AsyncInvoker that supports posting completion runnables; r=Jamie
I need this for some changes I want to make to Win32 file pickers.

* We add an event-driven variant to `mscom::AsyncInvoker`. When the async call
  invokes `ISynchronize::Signal`, we post an event to the specified event
  target (or implicitly to the main thread).
* For this to work, the async call needs to temporarily retain a reference to
  itself, otherwise the async call object is destroyed and the in-flight call
  is cancelled. This reference is stored in an "outer runnable" which is
  responsible for executing the inner completion runnable, and then dropping
  the self-reference.
* We only run the completion runnable upon *successful* initiation of the async
  call. If there was a failure, we return that code immediately to the caller.
  Failures also clear the reference to the completion runnable.
* If we could not obtain an async interface and must run synchronously, then
  we run the completion runnable immediately after a successful synchronous
  invocation.

Differential Revision: https://phabricator.services.mozilla.com/D95808
2020-11-05 18:59:12 +00:00
Aaron Klotz d6adf2ddf1 Bug 1674904: Part 3 - Replace dll reg code in mscom/oop/Handler with calls to mscom/oop/Module; r=Jamie
`Handler` should now delegate its registration to `Module`.

Differential Revision: https://phabricator.services.mozilla.com/D95608
2020-11-04 22:11:23 +00:00
Aaron Klotz 87fbdfd39e Bug 1674904: Part 2 - New dll registration code in mscom/oop/module; r=Jamie
We add new DLL registration code. This is a rather generic function that
permits the following:

* Registering multiple `CLSID`s for the same DLL;
* Registering an optional `AppID`. Registering an `AppID` allows us to use a
  `DllSurrogate` to host the DLL out-of-process using Windows' built-in
  `dllhost.exe`. I'll be using this feature in a future bug.
* Supporting all available threading modelsl;
* Capable of registering either inproc servers or inproc handlers;
* Using the transaction-based registry API so that we can cleanly rollback
  during registration if any part(s) of it fail.

Differential Revision: https://phabricator.services.mozilla.com/D95606
2020-11-04 21:49:46 +00:00
Aaron Klotz 99bc464a75 Bug 1674904: Part 1 - Change mscom registration to dynamically link to GetProxyDllInfo when built outside of xul; r=Jamie
We need this so that the registration code is more versatile and may be linked
from outside of xul.

Differential Revision: https://phabricator.services.mozilla.com/D95605
2020-11-04 21:49:28 +00:00
Aaron Klotz f53b856004 Bug 1675370: Mark /ipc/mscom as exclusive to Windows; r=firefox-build-system-reviewers,dmajor
Differential Revision: https://phabricator.services.mozilla.com/D95925
2020-11-04 21:40:04 +00:00
Dorel Luca e3198dde0a Backed out 4 changesets (bug 1674904) for Build bustage in worker/checkouts/gecko/config/rules.mk. CLOSED TREE
Backed out changeset 50576e0fbd98 (bug 1674904)
Backed out changeset b3b7d68c33f6 (bug 1674904)
Backed out changeset 660cdea23685 (bug 1674904)
Backed out changeset 7322c3af8006 (bug 1674904)
2020-11-04 23:20:51 +02:00