This is a huge patch, but it is only really refactoring of RFPTarget enum. We used to use RFPTarget as a bitset and now we ran out of bits, so now we need a workaround.
Differential Revision: https://phabricator.services.mozilla.com/D233182
This patch makes PermissionManager::GetInstance do the instantiation
work and GetXPCOMSingleton just uses it.
We always acquire the creation mutex and return an already_AddRefed to
avoid any possible race. We count on callers of GetInstance to
(shortly) keep a local reference if they have more work to do.
On async shutdown in the parent process, we first mark our singleton
dead, then close all our resources async and finally null our instance
holder only after the async shutdown has finished.
Differential Revision: https://phabricator.services.mozilla.com/D233816
This patch changes the error returned when dispatching sync IPC to a
dead actor from a `MsgRouteError` error (which is handled as fatal in
most error handlers) to a `MsgDropped` error (which is generally
non-fatal).
This is intended to reflect the effective outcome of the change, which
is that the message is dropped due to the peer actor being dead.
This also removes the `MsgRouteError` error type as it has been fully
replaced by `MsgDropped`. The final use-case of `MsgRouteError` has been
replaced by a normal assertion, as it cannot be triggered by the IPC
layer.
Differential Revision: https://phabricator.services.mozilla.com/D232114
Merge the FontListChanged message sent by the parent when the list is updated
with the more general ForceGlobalReflow. Avoid forcing an update from the
InitOtherFamilyNames task if there is also a LoadCmaps operation in progress;
just ensure it will include the NeedsReframe flag in its message instead.
This should not change observable behavior, but aims to reduce the risk of
font data updates resulting in redundant multiple reflows.
Differential Revision: https://phabricator.services.mozilla.com/D232151
This revision adds the capability of querying and sending information about
individual cache domains. It introduces the concept of active cache domains to
the accessibility service: cache domains that we think clients need. Conversely,
cache domains that clients don't need are inactive, and we avoid doing any work
to push information about those domains. This revision adds an IPC mechanism for
setting cache domains. It adds a way for content process documents to enable,
gather, and send to the parent process information from all of their accessibles
that's newly needed. It adds a way to instantiate new accessibility services
with a predetermined set of cache domains. It adds a mechanism for local accs to
use in BundleFieldsForCache, but doesn't implement it yet (see next revision).
Differential Revision: https://phabricator.services.mozilla.com/D220036
We currently preload these DLLs in all content processes, which
presumably has some performance impact. We did this in bug 1910861 to
mitigate the crashes with ESET from bug 1905690 - but ESET has since
then pushed new changes that perhaps will fix the crashes. If not, we
want to mitigate the crashes in another way that does not involve
preloading the DLLs in all content processes. Preloading is not required
even with sandbox level 8, because we already allow access to the bin
dir anyway.
Differential Revision: https://phabricator.services.mozilla.com/D219961
There are many other uses of OtherPid which could be switched over to
OtherChildID, but these were a couple of obvious low-hanging fruit use-cases
which will work better when using OtherChildID.
Differential Revision: https://phabricator.services.mozilla.com/D217120
The type for ContentParentId is uint64_t, however only at most 22 bits
are allowed to be used (as it is used in the high bits of nsContentUtils
process-specific IDs, which need to fit within a JS double). Switching to use
the same existing ChildID reduces the risk of confusion, but this patch doesn't
attempt to update the types used for ContentParentId/ChildID to match
GeckoChildID.
In the future, we probably will want to align these types more closely, and
perhaps de-duplicate some code which currently passes around both.
Differential Revision: https://phabricator.services.mozilla.com/D217119
This patch restores previous behavior where we were preloading
mozavcodec.dll and mozavutil.dll in content processes. This will allow
us to confirm the hypothesis that this preloading would let third-party
software to discover our DLLs earlier after an update, and thereby
mitigate the later crashes from bug 1905690.
Differential Revision: https://phabricator.services.mozilla.com/D218186
nsBaseDragService keeps track of the processes that might need to cancel a drag with EndDragSession and this is technically correct since the drag session is a singleton in the child process, but this series of patches changes those sessions to be per-PuppetWidget/BrowserChild. This allows content processes to distinguish which of its browsers is engaged in a drag.
Differential Revision: https://phabricator.services.mozilla.com/D211062
Updates each client of the nsContentUtils method to get the right drag session -- the one for the widget that is currently the source or target of the drag session.
The change to nsDOMWindowUtils::DispatchDOMEventViaPresShellForTesting() supports the change to WidgetDragEvent::InitDropEffectForTests() and enabled a
large number of test fixes in the next patch.
Differential Revision: https://phabricator.services.mozilla.com/D211067