Unnamed POSIX semaphores are not supported on macOS, nor is timed wait supported on
named POSIX semaphores. SysV semaphores have similar limitations.
Mach semaphores are one of the only clean ways to create unnamed, shareable semaphores
on macOS. As of bug 1734735, we now can transparently send the mach ports across to
other processes without much added code, overall making this implementation of Mach
semaphores fairly easy.
Differential Revision: https://phabricator.services.mozilla.com/D188429
Use MOZ_IPC_MESSAGE_LOG to filter GOODBYE_MESSAGE_TYPE messages.
Interpret MOZ_IPC_MESSAGE_LOG elements without the "Child" or "Parent"
suffix as a request to log both sides of the given protocol.
Differential Revision: https://phabricator.services.mozilla.com/D187167
When launching the GMP process, or querying its state, via PGMPService,
the design was already asynchronous. As such we can remove the sync
requirement quite easily and allow more flexibility on the parent
process side.
Differential Revision: https://phabricator.services.mozilla.com/D185335
When launching the GMP process, or querying its state, via PGMPService,
the design was already asynchronous. As such we can remove the sync
requirement quite easily and allow more flexibility on the parent
process side.
Differential Revision: https://phabricator.services.mozilla.com/D185335
When running GTests on Windows 7, the TestManyHandles test crashes due
to the lpNumberOfBytesWritten argument to WriteFile not being passed.
This argument is required on earlier versions of Windows like Windows 7.
While we no longer support Windows 7 on Nightly, we still support it on
ESR, and are trying to run GTests on Windows 7 there. It also doesn't
hurt to add extra assertions that the full amount of data is
read/written, so checking this could be valuable on m-c as well.
Differential Revision: https://phabricator.services.mozilla.com/D184393
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
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
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
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
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
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
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
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
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
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
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