Commit Graph

378 Commits

Author SHA1 Message Date
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
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
Chris Martin
c24dc89ea6 Bug 1657404 - Back out changeset 6792f28b99bd keeping 349854c5ad56 r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D100031
2020-12-17 18:21:06 +00:00
Chris Martin
2ea65ad1e2 Bug 1681682 - Fix Mac OS X crash in GamepadPlatformService::GetParentService r=haik
Bug 1657404 added assertions to catch errors in the platform-specific backends
for Gamepad. A bug in CocoaGamepad.cpp:StopGamepadMonitoring() causes one of
the new assertions to fire off.

As the solution to this is not easy, and a fix is required for Beta, the
easiest fix for now is to disable the assertion. In the long run, this needs
to be fixed.

Differential Revision: https://phabricator.services.mozilla.com/D99818
2020-12-15 20:16:02 +00:00
Chris Martin
43bb3444bc Bug 1681750 - Fix random GamepadPlatformService::RemoveChannelParent crashes r=haik
The most likely cause for the crashes seems like IPDL intermittently calling GamepadEventChannelParent::ActorDestroy() multiple times on the same object.

This adds a wrapper to stop that behavior (if it's the root cause), and also to fire off release assertions at several other potential causes.

Hopefully we see this crash signature disappear.

Differential Revision: https://phabricator.services.mozilla.com/D99720
2020-12-15 00:01:19 +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