Commit Graph

384 Commits

Author SHA1 Message Date
Nika Layzell
05dc5e0d76 Bug 1754037 - Part 3c: Automatically update all ParamTraits implementations, r=ipc-reviewers,media-playback-reviewers,bryce,mccr8
Automatically generated rewrites of all ParamTraits and IPDLParamTraits
implementations in-tree to use IPC::Message{Reader,Writer}.

Differential Revision: https://phabricator.services.mozilla.com/D140004
2022-03-04 15:39:41 +00:00
Sylvestre Ledru
98949ee751 Bug 1754767 - Remove duplicate includes r=media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D138441
2022-02-11 10:01:15 +00:00
Nika Layzell
dabb46c84d Bug 1736371 - Default new actors to be refcounted, r=alwu,media-playback-reviewers,mccr8
The changes to ipdl actors were mechanical, and largely automated using
a script.

Differential Revision: https://phabricator.services.mozilla.com/D137237
2022-02-09 17:29:47 +00:00
Nika Layzell
9919099425 Bug 1738734 - Directly pass around handles rather than using TransportDescriptor, r=jld,media-playback-reviewers,alwu
This simplifies the logic around descriptors significantly, which is
especially useful considering how few places use the type. There is a
small change required on Windows to create the NamedPipe directly and
transfer around each end's handle, rather than connecting between
processes after the fact.

A named pipe has to be used, rather than an anonymous pipe, as
bidirectional communication is required.

Differential Revision: https://phabricator.services.mozilla.com/D130381
2022-02-08 23:53:45 +00:00
Sandor Molnar
6035b5cf95 Backed out changeset ba6624225635 (bug 1738734) for causing build bustages in ipc/PUtilityProcessParent. 2022-02-01 00:57:12 +02:00
Nika Layzell
c45d6350d4 Bug 1738734 - Directly pass around handles rather than using TransportDescriptor, r=jld,media-playback-reviewers,alwu
This simplifies the logic around descriptors significantly, which is
especially useful considering how few places use the type. There is a
small change required on Windows to create the NamedPipe directly and
transfer around each end's handle, rather than connecting between
processes after the fact.

A named pipe has to be used, rather than an anonymous pipe, as
bidirectional communication is required.

Differential Revision: https://phabricator.services.mozilla.com/D130381
2022-01-31 22:26:05 +00:00
Andi-Bogdan Postelnicu
2fc4f70e9b Bug 1725145 - Preparation for the hybrid build env. r=necko-reviewers,firefox-build-system-reviewers,valentin,glandium
Automatically generated path that adds flag `REQUIRES_UNIFIED_BUILD = True` to `moz.build`
when the module governed by the build config file is not buildable outside on the unified environment.

This needs to be done in order to have a hybrid build system that adds the possibility of combing
unified build components with ones that are built outside of the unified eco system.

Differential Revision: https://phabricator.services.mozilla.com/D122345
2021-08-25 10:46:17 +00:00
Kagami Sascha Rosylight
e9692a5da6 Bug 1723050 - Part 12: Replace typedef by using in dom/gamepad/ r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D121310
2021-08-09 13:37:26 +00:00
Kashav Madan
5781dca888 Bug 1720688 - Support extended attribute syntax in protocol declarations, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D119975
2021-07-22 02:24:43 +00:00
Chris Peterson
76babf22e6 Bug 1718564 - Fix -Wlogical-op warning in GamepadTouchState.h. r=cmartin
gcc reports the following -Wlogical-op warning because the `touchId == aTouch.touchId` check is duplicated:

GamepadTouchState.h:28:38: warning: logical 'and' of equal expressions [-Wlogical-op]

Differential Revision: https://phabricator.services.mozilla.com/D118924
2021-07-09 23:53:47 +00:00
Marcos Cáceres
ee3a5b1832 Bug 1714703 - Promisify GamepadServiceTest r=tjr,peterv
make GamepadServiceTest's methods return promises, so to avoid testing with flaky setTimeout().

Differential Revision: https://phabricator.services.mozilla.com/D117258
2021-06-22 08:45:59 +00:00
Petr Sumbera
9d8e9bb46b Bug 1700595 - Unbreak dom/gamepad/fallback/FallbackGamepad.cpp after Bug 1610570 r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D109658
2021-03-25 19:17:49 +00:00
Simon Giesecke
760cc7e936 Bug 1679522 - Fix include directives and forward declarations. r=andi,necko-reviewers,jgilbert
- Add missing include directives and forward declarations.
- Remove some extra include directives.
- Add missing namespace qualifications.
- Move include directives out of namespace in toolkit/xre/GlobalSemaphore.h

Differential Revision: https://phabricator.services.mozilla.com/D98894
2021-03-25 10:19:44 +00:00
Simon Giesecke
cc730d05dd Bug 1184468 - Use nsTHashtable::Keys where possible. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D108588
2021-03-24 17:56:50 +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
cbeb7d2c9d Bug 1610570: Apply the passback attribute to gamepad r=cmartin
Differential Revision: https://phabricator.services.mozilla.com/D108247
2021-03-23 18:26:30 +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
fb447b901d Bug 1610570: Apply the passback attribute to gamepad r=cmartin
Differential Revision: https://phabricator.services.mozilla.com/D108247
2021-03-23 15:15:38 +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
aae45dea6b Bug 1610570: Apply the passback attribute to gamepad r=cmartin
Differential Revision: https://phabricator.services.mozilla.com/D108247
2021-03-22 17:31:40 +00:00
Simon Giesecke
6f936dd483 Bug 1695162 - Use ConstIter instead of Iter where possible. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D106643
2021-03-17 15:49:46 +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
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
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
71e2d8d3af Bug 1658419 - Use shared memory for gamepad state on Windows r=handyman
Finally, use the primitives from the previous change to deliver gamepad changes.

If the shared memory shortcut is available, all gamepad changes will be
delivered over it. When the children receive the signal, they will diff their
last-known state against the new state and generate events to update JS.

Differential Revision: https://phabricator.services.mozilla.com/D105129
2021-03-03 18:26:48 +00:00
Chris Martin
b6e93b9fd7 Bug 1658419 - Add a skeleton GamepadStateBroadcast r=handyman
Add the scaffolding to setup the shared memory GamepadState between the
GamepadPlatformService and GamepadManager. The next changeset will actually
integrate the new broadcast infrastructure into the gamepad code.

Differential Revision: https://phabricator.services.mozilla.com/D105128
2021-03-03 18:26:47 +00: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
Chris Martin
61073bd078 Bug 1658419 - Create a class that implements sync'd cross-process shared memory r=handyman
This class (which may be useful outside of just gamepad code) provides an API to share an object across processes in a synchronized manner.

Eventually it will be used to share gamepad data (axes, buttons, etc) immediately with child processes for performance reasons.

Differential Revision: https://phabricator.services.mozilla.com/D100215
2021-03-03 18:26:46 +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
04d2f6a161 Bug 1658419 - Use shared memory for gamepad state on Windows r=handyman
Finally, use the primitives from the previous change to deliver gamepad changes.

If the shared memory shortcut is available, all gamepad changes will be
delivered over it. When the children receive the signal, they will diff their
last-known state against the new state and generate events to update JS.

Differential Revision: https://phabricator.services.mozilla.com/D105129
2021-03-02 23:02:36 +00:00
Chris Martin
dc719ee936 Bug 1658419 - Add a skeleton GamepadStateBroadcast r=handyman
Add the scaffolding to setup the shared memory GamepadState between the
GamepadPlatformService and GamepadManager. The next changeset will actually
integrate the new broadcast infrastructure into the gamepad code.

Differential Revision: https://phabricator.services.mozilla.com/D105128
2021-03-02 23:02:35 +00: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
Chris Martin
fb50e372a9 Bug 1658419 - Create a class that implements sync'd cross-process shared memory r=handyman
This class (which may be useful outside of just gamepad code) provides an API to share an object across processes in a synchronized manner.

Eventually it will be used to share gamepad data (axes, buttons, etc) immediately with child processes for performance reasons.

Differential Revision: https://phabricator.services.mozilla.com/D100215
2021-03-02 23:02:34 +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
0035d732a8 Bug 1658419 - Use shared memory for gamepad state on Windows r=handyman
Finally, use the primitives from the previous change to deliver gamepad changes.

If the shared memory shortcut is available, all gamepad changes will be
delivered over it. When the children receive the signal, they will diff their
last-known state against the new state and generate events to update JS.

Differential Revision: https://phabricator.services.mozilla.com/D105129
2021-03-01 21:59:49 +00:00
Chris Martin
2b64add31e Bug 1658419 - Add a skeleton GamepadStateBroadcast r=handyman
Add the scaffolding to setup the shared memory GamepadState between the
GamepadPlatformService and GamepadManager. The next changeset will actually
integrate the new broadcast infrastructure into the gamepad code.

Differential Revision: https://phabricator.services.mozilla.com/D105128
2021-03-01 21:59:48 +00: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
Chris Martin
69f092758b Bug 1658419 - Create a class that implements sync'd cross-process shared memory r=handyman
This class (which may be useful outside of just gamepad code) provides an API to share an object across processes in a synchronized manner.

Eventually it will be used to share gamepad data (axes, buttons, etc) immediately with child processes for performance reasons.

Differential Revision: https://phabricator.services.mozilla.com/D100215
2021-03-01 21:59:47 +00:00
Simon Giesecke
8ecfb38a41 Bug 1691913 - Remove uses of nsDataHashtable::GetValue. r=xpcom-reviewers,necko-reviewers,dragana,nika
GetValue is going to be removed in a subsequent patch. It is no longer needed,
because it can be replaced by functions already provided by nsBaseHashtable,
in particular Lookup and Contains.

Also, its name was confusing, since it specifically returns a pointer that
allows and is intended for modifying the entry within the hashtable, rather
than returning by-value. According to the naming rules to be set on
nsBaseHashtable, it would also needed to be renamed to "Lookup*. Removing
its uses saves this effort.

Differential Revision: https://phabricator.services.mozilla.com/D105476
2021-03-01 09:59:30 +00:00
Andi-Bogdan Postelnicu
47714ef65c Bug 1694161 - some fixes for the MacOS non unified environment. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D106616
2021-02-27 08:05:46 +00:00
smolnar
bbe0284415 Backed out 2 changesets (bug 1694161) as requested by dev. DONTBUILD CLOSED TREE
Backed out changeset 0fb8a1114e84 (bug 1694161)
Backed out changeset 453ce7dffdcc (bug 1694161)
2021-02-26 18:52:04 +02:00
Andi-Bogdan Postelnicu
a839ede25c Bug 1694161 - some fixes for the MacOS non unified environment. r=sg
Depends on D105977

Differential Revision: https://phabricator.services.mozilla.com/D106616
2021-02-26 16:39:18 +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
4852d25512 Bug 1693541 - Improve uses of nsBaseHashtable and descendants by using Contains instead of Get in dom/gamepad. r=handyman. CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D106101
2021-02-24 16:28:24 +02:00
Simon Giesecke
03bd728532 Bug 1693541 - Improve uses of nsBaseHashtable and descendants by using Contains instead of Get in dom/gamepad. r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D106101
2021-02-24 12:49:56 +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
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
Chris Martin
81592aa52c Bug 1657404 - Add diag asserts to catch potential double IPDL shutdown r=handyman
Based on evidence from crash reports in Bug 1682589, there may be a bug where
IPDL intermittently calls `ActorDestroy()` twice on GamepadEventChannelParent,
leading to a crash.

This attempts to catch this behavior in Nightly (assuming that I'm correct and
it does exist). If not, I will have to find some other explanation for the
crash behavior from that bug.

Differential Revision: https://phabricator.services.mozilla.com/D100714
2021-01-04 20:38:39 +00:00