Commit Graph

1618 Commits

Author SHA1 Message Date
sotaro
50ab537300 Bug 1839314 - Force sync IPC if there are many flushed cmds without calling ClientWebGLContext::GetFrontBuffer() r=ipc-reviewers,nika,gfx-reviewers,lsalzman
There were cases that a lot of cmds messages were sent by WebGLChild::FlushPendingCmds() without calling ClientWebGLContext::GetFrontBuffer(). And the IPC messages were waiting to be handled by WebGLParent, since OpenGL handling could take longer. Then there were cases that pending IPC messages were accumulated and it caused out of file descriptor on Linux. The sync IPC could reduce the pending IPC messages if there are a lot of cmds flashes.

async Ping is used for checking if IPC message is congested at WebGLParent. If a count of flushes since last congestion check reaches maybeIPCMessageCongestion, we think that IPC message is congested at WebGLParent. Then send sync SyncPing message to flush pending IPC messages.

Differential Revision: https://phabricator.services.mozilla.com/D181484
2023-06-27 18:23:41 +00:00
James Teh
d762f87c52 Bug 1831035 part 2: Remove DocAccessibleChild::RecvAddToSelection. r=eeejay,ipc-reviewers,mccr8
The sync IPDL RemoteAccessible::AddToSelection was removed in bug 1811092, but the DocAccessibleChildBase method remained.
This is no longer used, so remove it.

Differential Revision: https://phabricator.services.mozilla.com/D181937
2023-06-26 21:20:12 +00:00
James Teh
aecc1ba54a Bug 1831035 part 1: Remove PDocAccessible::SyncTextChangeEvent. r=nlapre,ipc-reviewers,mccr8
I neglected to remove this in bug 1821956.

Differential Revision: https://phabricator.services.mozilla.com/D181847
2023-06-26 21:20:12 +00:00
Eitan Isaacson
b3cea24dfd Bug 1834874 - P2: Remove DocAccessiblePlatformExt. r=Jamie,ipc-reviewers,mccr8
Since we removed the last dependency on this subprotocol, we can now
remove it.

Differential Revision: https://phabricator.services.mozilla.com/D181321
2023-06-20 18:15:43 +00:00
Nika Layzell
fb140add17 Bug 1835647 - Switch FatalError to asynchronously report channel errors under fuzzing, r=ipc-reviewers,mccr8
This should avoid potential fuzzing-only issues which would be caused by
the actor being torn down synchronously after a FatalError or KillHard.
Instead, the state is set to error synchronously, blocking all further
message sending/receiving, and the notification is made async, similar
to how it is handled for normal channel errors.

Differential Revision: https://phabricator.services.mozilla.com/D180254
2023-06-08 23:09:19 +00:00
Mike Hommey
c72ed0e448 Bug 1835185 - Adjust preprocessor conditions knowing that XP_WIN and XP_UNIX are mutually exclusive. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D180137
2023-06-06 21:05:37 +00:00
Mike Hommey
30c664bf9c Bug 1835185 - Replace OS_WIN with XP_WIN in ipc code. r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D180044
2023-06-06 21:05:31 +00:00
Mike Hommey
eb02cb32ad Bug 1835185 - Replace OS_POSIX with XP_UNIX in ipc code. r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D180043
2023-06-06 21:05:31 +00:00
Eitan Isaacson
4b8822a071 Bug 1826869 - Cache doc mime type and make available via DocAccessibleParent. r=morgan,ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D178887
2023-05-26 22:17:13 +00:00
Eitan Isaacson
63f60f5072 Bug 1826866 - DocAccessible::DocType and remote equivalents. r=Jamie,ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D178886
2023-05-26 22:17:13 +00:00
Eitan Isaacson
9b58fed3a9 Bug 1821965 - P2: Remove sync IPC extension messages for text operations. r=morgan,ipc-reviewers,mccr8
We can get rid the entire local HyperTextAccessible-based implementation as well!

Depends on D178717

Differential Revision: https://phabricator.services.mozilla.com/D178718
2023-05-26 22:17:13 +00:00
Eitan Isaacson
dbdf01888d Bug 1832353 - P3: Make editable text methods async and return void. r=Jamie,ipc-reviewers,mccr8
Depends on D178715

Differential Revision: https://phabricator.services.mozilla.com/D178724
2023-05-26 22:17:12 +00:00
Nika Layzell
2f2588cf4f Bug 1828389 - Ensure IPC channel is closed with error after KillHard, r=ipc-reviewers,mccr8
This patch changes KillHard() such that the IPC channel is immediately
shut down with an error after a KillHard() is performed. This is done by
fixing the previously-broken CLOSE_CHANNEL_WITH_ERROR support in
ShutDownProcess, and calling that method after KillHard().

This ensures that after the process has been killed, no further messages
will be delivered and processed, even if they were sent before the
process was killed.

In addition, the assertions and KillHard calls which are disabled for
fuzzing were changed to also shut down the channel, making fuzzing IPC
errors cause the connection to be terminated like it is in production
for these actors.

This change does not impact actors which ignore processing errors.

Differential Revision: https://phabricator.services.mozilla.com/D178383
2023-05-26 17:44:57 +00:00
Noemi Erli
ab21b0f95b Backed out 6 changesets (bug 1832353, bug 1821965) for causing build bustages in GeckoTextMarker.mm
Backed out changeset 6df0877f288a (bug 1821965)
Backed out changeset e663ccc0334e (bug 1821965)
Backed out changeset 36b250225e50 (bug 1821965)
Backed out changeset 6df5d07bf19f (bug 1832353)
Backed out changeset 409966c76f0f (bug 1832353)
Backed out changeset 3be446e44436 (bug 1832353)
2023-05-26 02:48:29 +03:00
Eitan Isaacson
0caef88bb0 Bug 1821965 - P2: Remove sync IPC extension messages for text operations. r=morgan,ipc-reviewers,mccr8
We can get rid the entire local HyperTextAccessible-based implementation as well!

Depends on D178717

Differential Revision: https://phabricator.services.mozilla.com/D178718
2023-05-25 20:38:29 +00:00
Eitan Isaacson
2237be2626 Bug 1832353 - P3: Make editable text methods async and return void. r=Jamie,ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D178724
2023-05-25 20:38:29 +00:00
Olli Pettay
3a786da831 Bug 1534586 - Remove unused PBrowser::DispatchFocusToTopLevelWindow, r=aiunusov,ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D178976
2023-05-25 12:15:44 +00:00
James Teh
c9479f6488 Bug 1821956 part 2: Remove content process MSAA id generation. r=nlapre,ipc-reviewers,taskgraph-reviewers,mccr8,jmaher
Because a11y clients only talk to the parent process now, content processes don't need to generate MSAA ids.
They're all generated in the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D177895
2023-05-21 22:23:47 +00:00
James Teh
5d287de1f7 Bug 1821957: Remove RemoteAccessible methods which are already supported by RemoteAccessibleBase/CachedTableAccessible/CachedTableCellAccessible or are no longer used. r=eeejay,ipc-reviewers,mccr8
This removes the following RemoteAccessible methods:

Name
Value
Step
Description
Help
State
Bounds
BoundsInCSSPixels
Language
Attributes
RelationByType
CurValue
MinValue
MaxValue
OffsetAtPoint
TextSubstring
TextBeforeOffset
TextAtOffset
TextAfterOffset
RemoveFromSelection
CaretOffset
SetCaretOffset
ScrollSubstringTo
DOMNodeID
TakeFocus
ChildAtPoint
GroupPosition
SetSelectionBoundsAt
IsSearchbox
LandmarkRole
CharacterCount
SelectionCount
CharAt
TextAttributes
DefaultTextAttributes
TextBounds
CharBounds
SelectionBoundsAt
Text
StartOffset
EndOffset
LinkCount
LinkIndexAtOffset
TableIsProbablyForLayout
SelectedItems
SelectedItemCount
GetSelectedItem
IsItemSelected
AddItemToSelection
RemoveItemFromSelection
SelectAll
UnselectAll
DoAction
ActionCount
ActionNameAt
AccessKey
Extents
AtkKeyBinding
NativeState
Relations
ImagePosition
ImageSize
TableSummary
TableRowAndColumnIndicesAt
TableSelectedCellCount
TableSelectedColumnCount
TableSelectedRowCount
TableSelectedCells
TableSelectedCellIndices
TableOfACell
ColIdx
RowIdx
GetPosition
ColExtent
RowExtent
GetColRowExtents
ColHeaderCells
RowHeaderCells
IsCellSelected
TableCaption
TableColumnCount
TableRowCount
TableCellAt
TableCellIndexAt
TableColumnIndexAt
TableRowIndexAt
TableColumnExtentAt
TableRowExtentAt
TableColumnDescription
TableRowDescription
TableColumnSelected
TableRowSelected
TableSelectedColumnIndices
TableSelectedRowIndices
TableSelectColumn
TableSelectRow
TableUnselectColumn
TableUnselectRow
AtkTableColumnHeader
AtkTableRowHeader

Differential Revision: https://phabricator.services.mozilla.com/D177873
2023-05-21 02:44:36 +00:00
Stanca Serban
0d97343733 Backed out 2 changesets (bug 1807049, bug 1828389) for mozilla::ThreadEventTarget::Dispatch xpcshell related crashes. CLOSED TREE
Backed out changeset bbd8b8bbf677 (bug 1828389)
Backed out changeset 03bd5f26f9af (bug 1807049)
2023-05-20 07:38:09 +03:00
Nika Layzell
c3ca248eeb Bug 1828389 - Ensure IPC channel is closed with error after KillHard, r=ipc-reviewers,mccr8
This patch changes KillHard() such that the IPC channel is immediately
shut down with an error after a KillHard() is performed. This is done by
fixing the previously-broken CLOSE_CHANNEL_WITH_ERROR support in
ShutDownProcess, and calling that method after KillHard().

This ensures that after the process has been killed, no further messages
will be delivered and processed, even if they were sent before the
process was killed.

In addition, the assertions and KillHard calls which are disabled for
fuzzing were changed to also shut down the channel, making fuzzing IPC
errors cause the connection to be terminated like it is in production
for these actors.

This change does not impact actors which ignore processing errors.

Differential Revision: https://phabricator.services.mozilla.com/D178383
2023-05-19 19:21:08 +00:00
Eitan Isaacson
e108daa52d Bug 1826868 - Remove useless Title IPC sync message. r=morgan,ipc-reviewers,mccr8
The message wasn't doing anything useful on Mac. Took the opportunity to
correcty expose the AXTitle/AXDescription of headings.

Differential Revision: https://phabricator.services.mozilla.com/D176824
2023-05-08 16:52:34 +00:00
Eitan Isaacson
822e591e8a Bug 1826865 - Make SetCurValue asynchronous. r=Jamie,ipc-reviewers,jld
Differential Revision: https://phabricator.services.mozilla.com/D176562
2023-04-28 15:59:01 +00:00
Nika Layzell
a73c63f734 Bug 1824465 - Part 24: Require toplevel protocols to be refcounted, r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D173739
2023-04-19 22:10:11 +00:00
Nika Layzell
eba8c09686 Bug 1827440 - Stop sending a redundant actor reference in Send__delete__, r=ipc-reviewers,mccr8
Previously we would both send it as the routing target for the actor as
well as as an implicit actor parameter. This patch keeps the same API
from the caller's point of view, but avoids sending the second reference
to the actor in the Send__delete__ message, which also avoids potential
issues with the second reference being null under fuzzing.

Differential Revision: https://phabricator.services.mozilla.com/D175545
2023-04-18 19:05:49 +00:00
Natalia Csoregi
d8c2893185 Backed out changeset 4938674bfdf6 (bug 1827440) for causing bustage on ipdl. CLOSED TREE 2023-04-18 20:26:40 +03:00
Nika Layzell
3471f8cd6a Bug 1827440 - Stop sending a redundant actor reference in Send__delete__, r=ipc-reviewers,mccr8
Previously we would both send it as the routing target for the actor as
well as as an implicit actor parameter. This patch keeps the same API
from the caller's point of view, but avoids sending the second reference
to the actor in the Send__delete__ message, which also avoids potential
issues with the second reference being null under fuzzing.

Differential Revision: https://phabricator.services.mozilla.com/D175545
2023-04-18 17:12:22 +00:00
Noemi Erli
d637b3f05e Backed out 24 changesets (bug 1824465) for causing failures in nsISupportsImpl.cpp CLOSED TREE
Backed out changeset a5c8f22b7170 (bug 1824465)
Backed out changeset b551b655ac72 (bug 1824465)
Backed out changeset 0e6768a6419c (bug 1824465)
Backed out changeset fb115ebb7fe0 (bug 1824465)
Backed out changeset aaa7a2c8aa3b (bug 1824465)
Backed out changeset 7ef94bfa90b3 (bug 1824465)
Backed out changeset a4238fd6b86f (bug 1824465)
Backed out changeset 3a88e4cfbe45 (bug 1824465)
Backed out changeset 40c2467d3162 (bug 1824465)
Backed out changeset 8f900395c72c (bug 1824465)
Backed out changeset 92e4c6e4d73c (bug 1824465)
Backed out changeset 445c5d5d9661 (bug 1824465)
Backed out changeset de51ed5389d9 (bug 1824465)
Backed out changeset 72049d72bcb6 (bug 1824465)
Backed out changeset 126773c2427a (bug 1824465)
Backed out changeset 886e76bc80be (bug 1824465)
Backed out changeset a69a851411f0 (bug 1824465)
Backed out changeset 703599cf6189 (bug 1824465)
Backed out changeset 11ecb78ebc15 (bug 1824465)
Backed out changeset 563255aaa1e1 (bug 1824465)
Backed out changeset d1bf32c2a6c6 (bug 1824465)
Backed out changeset ef28b2777487 (bug 1824465)
Backed out changeset a2015d354bb1 (bug 1824465)
Backed out changeset 31d6b53fdc6a (bug 1824465)
2023-04-06 01:50:55 +03:00
Nika Layzell
746286bda3 Bug 1824465 - Part 24: Require toplevel protocols to be refcounted, r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D173739
2023-04-05 21:33:45 +00:00
Nika Layzell
83c3e70137 Bug 1822863 - Use Span<...> in IPDL send signatures, r=ipc-reviewers,mccr8
This should make it possible to send data without copying in some
situations.

This requires adding the `rightconst` attribute to the C++ `Type` type
in order to allow specifying `Span<PFoo* const>`, which isn't possible
to specify with a left const. The type is getting very gross with all of
these flags and it's probably worth switching it to be a recursive
type at this point.

Differential Revision: https://phabricator.services.mozilla.com/D173570
2023-04-05 16:29:51 +00:00
Narcis Beleuzu
68d2df6fc6 Backed out changeset a817ea947b55 (bug 1822863) for bustages on lower.py . CLOSED TREE 2023-04-05 00:09:21 +03:00
Nika Layzell
d6481709e6 Bug 1822863 - Use Span<...> in IPDL send signatures, r=ipc-reviewers,mccr8
This should make it possible to send data without copying in some
situations.

This requires adding the `rightconst` attribute to the C++ `Type` type
in order to allow specifying `Span<PFoo* const>`, which isn't possible
to specify with a left const. The type is getting very gross with all of
these flags and it's probably worth switching it to be a recursive
type at this point.

Differential Revision: https://phabricator.services.mozilla.com/D173570
2023-04-04 20:43:32 +00:00
Andi-Bogdan Postelnicu
4efa1bd0ba Bug 1276351 - Move away from mozilla::tuple to std::tuple. r=necko-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173256
2023-03-27 07:20:25 +00:00
Sandor Molnar
9db345d4c1 Backed out 2 changesets (bug 1276351) for causing build bustage in image/ClippedImage.cp CLOSED TREE
Backed out changeset e84598eb82c1 (bug 1276351)
Backed out changeset e940b0554484 (bug 1276351)
2023-03-25 14:16:43 +02:00
Andi-Bogdan Postelnicu
447f1e3358 Bug 1276351 - Move away from mozilla::tuple to std::tuple. r=necko-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173256
2023-03-25 06:58:52 +00:00
Iulian Moraru
6d40eee997 Backed out 2 changesets (bug 1276351) for causing multiple failures.
Backed out changeset eeaf4f1e06af (bug 1276351)
Backed out changeset d44cb5704342 (bug 1276351)
2023-03-25 00:08:24 +02:00
Andi-Bogdan Postelnicu
a1b827b503 Bug 1276351 - Move away from mozilla::tuple to std::tuple. r=necko-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D173256
2023-03-24 18:55:39 +00:00
Nika Layzell
0ed9cfe9b6 Bug 1815177 - Use a custom ReadResult to reduce branching during IPDL deserialization, r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D169954
2023-03-20 15:40:38 +00:00
Nika Layzell
9e5c372ef3 Bug 1814686 - Part 1a: Wrap refcounted types in NotNull by default, r=ipc-reviewers,mccr8
These are the IPDL compiler changes to make all refcounted types be considered
NotNull by default, building on the changes from bug 1607634.

Existing uses of IPDL refcounted types will be marked as nullable in part 1b.

Differential Revision: https://phabricator.services.mozilla.com/D168888
2023-03-20 15:40:37 +00:00
Nika Layzell
75bbcd0353 Bug 1607634 - Part 4a: Wrap non-nullable actor types in NotNull, r=ipc-reviewers,mccr8
The code changes required for this will be in part 4b. The code is designed to
be generic as it will also be used for RefCounted types in a future patch. This
replaces the manual checking which was previously done in struct and union
serializers for non-nullable actor members.

Differential Revision: https://phabricator.services.mozilla.com/D168886
2023-03-20 15:40:36 +00:00
Nika Layzell
fc898b85f5 Bug 1814683 - Part 4: Allow IPDL structs to contain non-default-constructable types, r=ipc-reviewers,jld
Previously, we would always generate a default constructor for IPDL structs
which explicitly initializes every member. This would require members to have
default initializers statically. With the new approach, each member is
individually wrapped with a template parameter which will try to ensure value
initiaization, and the default constructor is implemented with `= default;`.

The default constructor will produce a warning on clang if it is implicitly
deleted, so that warning is also suppressed.

Differential Revision: https://phabricator.services.mozilla.com/D168881
2023-03-20 15:40:34 +00:00
Nika Layzell
9a282e09c9 Bug 1814683 - Part 3: Use the new Maybe-based ReadParam signature throughout IPDL, r=ipc-reviewers,jld
This builds on top of the work in bug 1775062, by using this new signature
everywhere, including IPDL struct members and in/outparams for IPDL messages.
This is done with relatively minimal changes by using two bindings, one of
which is a reference.

Differential Revision: https://phabricator.services.mozilla.com/D168880
2023-03-20 15:40:32 +00:00
Nika Layzell
f965102dee Bug 1814683 - Part 2: Add a constructor for IPDL structs which moves each parameter, r=ipc-reviewers,mccr8
This will be useful after part 3 where it will be used as part of implementing
Read based on Maybe for IPDL structs. Without this change, we'd need to copy to
construct an IPDL struct containing a non-default-constructable type.

Differential Revision: https://phabricator.services.mozilla.com/D169268
2023-03-20 15:40:32 +00:00
Nika Layzell
78fa962afb Bug 1814683 - Part 1: Combine parent/child fields in IPDL structs/unions, r=ipc-reviewers,necko-reviewers,mccr8
This combines the multiple fields or variants which were previously used to
track sided types like protocol types into a single field wrapped with a
SideVariant.

This will be used in the next part to avoid the need for default constructors
for actor types allowing the proper types to be used.

Differential Revision: https://phabricator.services.mozilla.com/D168879
2023-03-20 15:40:31 +00:00
Iulian Moraru
801dae8f2c Backed out 14 changesets (bug 1607634, bug 1814683, bug 1815177, bug 1814686) for causing build bustages on MaybeStorageBase. CLOSED TREE
Backed out changeset ae1c0551cea5 (bug 1815177)
Backed out changeset a11cafaa1884 (bug 1814686)
Backed out changeset 621507521762 (bug 1814686)
Backed out changeset ad692c73e381 (bug 1814686)
Backed out changeset 3be031e503dc (bug 1607634)
Backed out changeset aebbaa145d2d (bug 1607634)
Backed out changeset 9aa1f346fe14 (bug 1607634)
Backed out changeset e3eb77ad55ca (bug 1607634)
Backed out changeset e60591e5d5cf (bug 1607634)
Backed out changeset 6e43042d204a (bug 1814683)
Backed out changeset 1706e88652d6 (bug 1814683)
Backed out changeset 6878a1590e91 (bug 1814683)
Backed out changeset b1c980c834d8 (bug 1814683)
Backed out changeset 94480b82d102 (bug 1814683)
2023-03-15 01:58:36 +02:00
Nika Layzell
a8e03b0bf5 Bug 1815177 - Use a custom ReadResult to reduce branching during IPDL deserialization, r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D169954
2023-03-14 19:31:42 +00:00
Nika Layzell
de0614a91a Bug 1814686 - Part 1a: Wrap refcounted types in NotNull by default, r=ipc-reviewers,mccr8
These are the IPDL compiler changes to make all refcounted types be considered
NotNull by default, building on the changes from bug 1607634.

Existing uses of IPDL refcounted types will be marked as nullable in part 1b.

Differential Revision: https://phabricator.services.mozilla.com/D168888
2023-03-14 19:31:41 +00:00
Nika Layzell
81205eb92d Bug 1607634 - Part 4a: Wrap non-nullable actor types in NotNull, r=ipc-reviewers,mccr8
The code changes required for this will be in part 4b. The code is designed to
be generic as it will also be used for RefCounted types in a future patch. This
replaces the manual checking which was previously done in struct and union
serializers for non-nullable actor members.

Differential Revision: https://phabricator.services.mozilla.com/D168886
2023-03-14 19:31:40 +00:00
Nika Layzell
11639b965c Bug 1814683 - Part 4: Allow IPDL structs to contain non-default-constructable types, r=ipc-reviewers,jld
Previously, we would always generate a default constructor for IPDL structs
which explicitly initializes every member. This would require members to have
default initializers statically. With the new approach, each member is
individually wrapped with a template parameter which will try to ensure value
initiaization, and the default constructor is implemented with `= default;`.

The default constructor will produce a warning on clang if it is implicitly
deleted, so that warning is also suppressed.

Differential Revision: https://phabricator.services.mozilla.com/D168881
2023-03-14 19:31:38 +00:00
Nika Layzell
0139e1501c Bug 1814683 - Part 3: Use the new Maybe-based ReadParam signature throughout IPDL, r=ipc-reviewers,jld
This builds on top of the work in bug 1775062, by using this new signature
everywhere, including IPDL struct members and in/outparams for IPDL messages.
This is done with relatively minimal changes by using two bindings, one of
which is a reference.

Differential Revision: https://phabricator.services.mozilla.com/D168880
2023-03-14 19:31:37 +00:00