Граф коммитов

6660 Коммитов

Автор SHA1 Сообщение Дата
Tetsuharu Ohzeki 0109338d54 Bug 1729476 - Remove unused CompositorBridgeChild::SendMakeSnapshot(). r=gfx-reviewers,ipc-reviewers,nika,nical
Differential Revision: https://phabricator.services.mozilla.com/D124818
2021-09-07 22:37:48 +00:00
Kershaw Chang 5ea2a6408c Bug 1716566 - Make websocket work when socket process is enabled, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D123108
2021-09-07 14:42:44 +00:00
Nika Layzell 4d227d94ae Bug 1725335 - Streamline ownership and locking in MessageTask, r=ipc-reviewers,mccr8
This simplifies the logic around MessageTask's lifecycle to make
ownership as clear as possible and reduce the number of redundant
checks.

This new change no longer clears the mChannel member when the
MessageTask is disconnected, instead relying on isInList() to check
whether the MessageTask is still in the channel's mPending list. This is
already being automatically managed as the mPending list is modified,
and should avoid potential usage mistakes.

Differential Revision: https://phabricator.services.mozilla.com/D123140
2021-09-01 15:26:54 +00:00
Matt Woodrow d751b43176 Bug 1727489 - Remove PLayerTransaction. r=jrmuizel,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D123595
2021-08-26 04:59:57 +00:00
Butkovits Atila c83e348e26 Backed out 2 changesets (bug 1727488, bug 1727489) for causing bustages on KnowsCompositor.cpp. CLOSED TREE
Backed out changeset 5a00db1b7a6a (bug 1727489)
Backed out changeset 13686567e748 (bug 1727488)
2021-08-26 04:49:16 +03:00
Matt Woodrow 0d4e9aa48a Bug 1727489 - Remove PLayerTransaction. r=jrmuizel,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D123595
2021-08-26 00:25:21 +00:00
Nika Layzell 28c8f793f9 Bug 1715755 - Part 3: Don't defer messages if the interrupt stack is empty, r=handyman
Previously this would misbehave as it couldn't get the interrupt stack.

Depends on D123149

Differential Revision: https://phabricator.services.mozilla.com/D123150
2021-08-25 18:30:25 +00:00
Nika Layzell 4cc950d178 Bug 1715755 - Part 2: Recover from unhandled special messages without crashing, r=handyman
This change instead recovers from unhandled special messages by reporting a
normal IPC error, which should be handled using the normal IPC error
mechanisms.

Depends on D123148

Differential Revision: https://phabricator.services.mozilla.com/D123149
2021-08-25 18:30:24 +00:00
Nika Layzell e3b52f319a Bug 1715755 - Part 1: Don't ignore dead actors for sync and intr messages, r=handyman
When this change was first implemented, it ignored dead actors for all types of
messages, but for messages with replies they cannot be ignored, as a reply must
be sent. This should fix that oversight.

Differential Revision: https://phabricator.services.mozilla.com/D123148
2021-08-25 18:30:24 +00:00
Nika Layzell 6d8a72603f Bug 1727422 - Support arbitrary integer keys in nsTHashMap, r=xpcom-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D123547
2021-08-25 16:31:08 +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
Mike Hommey c033e2536d Bug 1726474 - Preload rlbox library on Windows. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D123039
2021-08-25 07:39:00 +00:00
Cosmin Sabou 1958e4b9fe Backed out 4 changesets (bug 1726474) for causing windows build bustages. CLOSED TREE
Backed out changeset c7fcc6914b7c (bug 1726474)
Backed out changeset 1dcd8069568e (bug 1726474)
Backed out changeset 938043bb1ca2 (bug 1726474)
Backed out changeset e12c90f66a6c (bug 1726474)
2021-08-24 06:12:08 +03:00
Mike Hommey 44bb728fba Bug 1726474 - Preload rlbox library on Windows. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D123039
2021-08-24 02:52:18 +00:00
Csoregi Natalia 84d67f5d03 Backed out 4 changesets (bug 1726474) for causing crashes. CLOSED TREE
Backed out changeset 5add6784a784 (bug 1726474)
Backed out changeset e2047ab95703 (bug 1726474)
Backed out changeset d53f62933fd0 (bug 1726474)
Backed out changeset 796a54dcb5f0 (bug 1726474)
2021-08-24 04:49:04 +03:00
Mike Hommey 2829072aeb Bug 1726474 - Preload rlbox library on all platforms. r=nika
Notably, on Windows, the sequences of loading/unloading in child processes trigger https://searchfox.org/mozilla-central/rev/d3683dbb252506400c71256ef3994cdbdfb71ada/toolkit/xre/dllservices/UntrustedModulesData.cpp#324

Differential Revision: https://phabricator.services.mozilla.com/D123039
2021-08-24 01:01:38 +00:00
Andi-Bogdan Postelnicu 9945b94835 Bug 1519636 - Reformat recent changes to the Google coding style. r=emilio
Updated with clang-format version 12.0.1 (taskcluster-dNZqCRqWRTqa6cZxPKxh7Q)

Differential Revision: https://phabricator.services.mozilla.com/D122814
2021-08-23 09:30:23 +00:00
Mike Hommey 14a11072e2 Bug 1726476 - Adjust GetSandboxedRLBoxPath for the changes in rlbox_wasm2c_sandbox. r=nika
rlbox_wasm2c_sandbox was adjusted to avoid using LoadLibraryA (rejected by
build/clang-plugin/LoadLibraryUsageChecker.cpp), so we adjust
GetSandboxedRLBoxPath (which is used to feed it) to return an UTF-16
string on Windows.

Differential Revision: https://phabricator.services.mozilla.com/D123025
2021-08-20 23:33:05 +00:00
Jed Davis 629eedfcfa Bug 1672085 - Don't pre-allocate when using memfd in IPC shared memory. r=glandium
Memory for memfd files isn't subject to any file size limit, unlike
named files in /dev/shm, and is documented as being handled similarly
to anonymous mmap for accounting / resource management purposes.
Therefore, there isn't any need to pre-commit the memory with
posix_fallocate in that case.

Differential Revision: https://phabricator.services.mozilla.com/D121818
2021-08-18 21:56:10 +00:00
Jed Davis dcf8361aeb Bug 1672085 - Refactor posix_fallocate support in IPC shared memory. r=glandium
This merges the cases for posix_fallocate being unavailable at build
time and being rejected dynamically by the OS (some don't support
it with their implementation of POSIX shm), to make it simple to
dynamically opt out in the memfd case.

Differential Revision: https://phabricator.services.mozilla.com/D121817
2021-08-18 21:56:09 +00:00
André Bargull d2bbf86876 Bug 1726123 - Part 5: Add missing "js/" includes outside of SM. r=arai
In preparation for the next part, add missing includes to "js/" public headers.

Differential Revision: https://phabricator.services.mozilla.com/D122843
2021-08-17 15:45:39 +00:00
Mike Hommey 6d5f4e8060 Bug 1725521 - Simplify getting the rlbox library path. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D122552
2021-08-17 00:16:03 +00:00
Makoto Kato 329f65c790 Bug 1725593 - Get rid of SendCheckAndSuggest sync IPC. r=masayuki,ipc-reviewers,mccr8
Depends on D122579

Differential Revision: https://phabricator.services.mozilla.com/D122580
2021-08-16 01:40:00 +00:00
Paul Bone 1eea9a0557 Bug 1710552 - pt 2. Inform the idle scheduler when we initiate a GC r=smaug
This lets the idle scheduler know that we've initiated a GC that we didn't
ask its permission for.  Eg the JS engine hit a threshold.  It now uses this
info when scheduling GCs for other processes.

Differential Revision: https://phabricator.services.mozilla.com/D120831
2021-08-13 04:06:26 +00:00
Paul Bone 0d0bbcac0f Bug 1710552 - pt 1. Prepare for GCs being denied r=smaug
This patch also:
 * adds an assertion to KillGCRunner() to ensure it's never killed if
   needed, now that there are more calls to KillGCRunner(), some calls have
   been moved eg in nsJSEnvironment so as not to kill the runner a little
   later and keep the assertions happy.

 * IdleSchedulerChild will decline a request for a GC if there's already a
   request in flight.

 * CCGCScheduler will check if a GC is already in progress when handling the
   parents' response to a GC request.

Differential Revision: https://phabricator.services.mozilla.com/D120830
2021-08-13 04:06:25 +00:00
Paul Zuehlcke 3a8091d1c2 Bug 1673889 - Remove topLevelStorageAreaPrincipal. r=timhuang,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D122364
2021-08-11 18:51:20 +00:00
Gabriele Svelto 65f2ae5b03 Bug 1723934 - Remove old and useless crash annotations r=KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D121709
2021-08-09 20:08:17 +00:00
Gabriele Svelto 559377e821 Bug 1723934 - Remove useless nsExceptionHandler.h inclusions and crash reporter service definitions r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D121708
2021-08-09 20:08:17 +00:00
Niklas Goegge 6763769587 Bug 1723954: Return NS_OK if PrincipalInfoToPrincipal fails. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D121867
2021-08-05 13:58:41 +00:00
Aaron Klotz 5df7df28c5 Bug 1723837: Improve mscom::ProcessRuntime idempotency; r=Jamie,handyman
`mscom::ProcessRuntime` supports multiple instances because Reasons (TM).
To make this happen, we store some information in `mozglue` that enforces
serialization between instances and also informs an instance as to whether
any other instances have successfully completed initialization.

Unfortunately it is possible for us to encounter situations where one instance
manages to *partially* but not *completely* finish initialization. Since our
shared information is currently a simple `bool`, we cannot really capture this
case.

Furthermore, APIs such as `CoInitializeSecurity` will actually fail if called
again after previous activity, so we should guard against multiple invocations
within the same process.

To improve this situation, I'd like to replace the shared `bool` with a typed
enum that can provide finer-grained information as to how far a previous
instance actually managed to get.

Differential Revision: https://phabricator.services.mozilla.com/D121672
2021-08-04 18:02:30 +00:00
Doug Thayer d8acee36a4 Bug 1722515 - Fix WindowsMessageLoop no-a11y breakage r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D121660
2021-08-04 12:56:14 +00:00
Marian-Vasile Laza e954091acf Backed out 2 changesets (bug 1720965) for causing bustages on nsContentUtils.cpp. CLOSED TREE
Backed out changeset 2ed56ddce45a (bug 1720965)
Backed out changeset 3531708ab54e (bug 1720965)
2021-08-04 03:14:29 +03:00
Jeff Gilbert fba93f87af Bug 1720965 - Give up on move semantics for Shmem for now. r=nika
Don't pretend that it's not a copy, as this causes readers to get the
wrong impression of how it behaves.

Differential Revision: https://phabricator.services.mozilla.com/D120124
2021-08-03 20:06:55 +00:00
Randell Jesup ecb0c56479 Bug 1687843: PreallocatedProcessManager will return a launching process if one exists r=nika
Differential Revision: https://phabricator.services.mozilla.com/D118226
2021-07-24 03:25:59 +00:00
Nika Layzell c705251ce8 Bug 1719577 - Part 8: Remove some unused methods from MessageChannel, r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D119356
2021-07-23 19:14:59 +00:00
Nika Layzell 99a0665a8b Bug 1719577 - Part 7: Remove outdated comment, r=handyman
This comment refers to the old ProcessLink implementation, and was missed when
that implementation was removed.

Differential Revision: https://phabricator.services.mozilla.com/D119355
2021-07-23 19:14:58 +00:00
Nika Layzell 639ed70cb4 Bug 1719577 - Part 6: More consistently use the monitor during MessageChannel shutdown, r=handyman
This should make the logic around clearing a MessageChannel more obviously
correct by holding the mutex when accessing fields which are traditionally
guarded by the mutex. These lock calls shouldn't introduce performance issues
as the lock should be uncontended.

Differential Revision: https://phabricator.services.mozilla.com/D119354
2021-07-23 19:14:58 +00:00
Nika Layzell 93f8303221 Bug 1719577 - Part 5: Remove the now-unused `ChannelOpening` state, r=handyman
This state was only used by the ProcessLink MessageLink implementation, and no
longer exists with the new PortLink implementation, so can be removed.

Differential Revision: https://phabricator.services.mozilla.com/D119353
2021-07-23 19:14:58 +00:00
Nika Layzell 30d790aee6 Bug 1719577 - Part 4: Hold the monitor for more of `MessageChannel::Open`, r=handyman
This simplifies some of the reasoning about when to hold locks by holding it
when setting all monitor-guarded fields.

Differential Revision: https://phabricator.services.mozilla.com/D119352
2021-07-23 19:14:57 +00:00
Nika Layzell 64fd825e97 Bug 1719577 - Part 3: Remove dead WaitForIncomingMessage function, r=handyman
This method is never called.

Differential Revision: https://phabricator.services.mozilla.com/D119351
2021-07-23 19:14:57 +00:00
Nika Layzell 0e37500335 Bug 1719577 - Part 2: Create mMonitor eagerly in MessageChannel's constructor, r=handyman
Now that PortLink is the only MessageLink implementation, it is no longer
necessary to support sharing a single `RefCountedMonitor` between multiple
MessageChannels, meaning that we can construct the monitor directly in the
`MessageChannel` constructor. The monitor still needs to be refcounted due to
being used by the PortLink as part of the listener implementation.

Differential Revision: https://phabricator.services.mozilla.com/D119350
2021-07-23 19:14:56 +00:00
Nika Layzell 488fc0d1be Bug 1719577 - Part 1: Use inline initializers for MessageChannel fields, r=handyman
This makes things generally more clear, and avoids a long list of initializers
in the MessageChannel constructor. In addition, some fields which are never
modified are marked as `const`.

Differential Revision: https://phabricator.services.mozilla.com/D119349
2021-07-23 19:14:56 +00:00
Kashav Madan f36c3b6e89 Bug 1720688 - Handle invalid attribute values for "Nested"/"NestedUpTo" and "Priority", r=mccr8
This KeyErrors since we build the ast before we typecheck attributes.

Differential Revision: https://phabricator.services.mozilla.com/D120376
2021-07-22 02:24:43 +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
Bob Owen b2d767fbb9 Bug 1716024 p2: Flag all binaries apart from firefox, xpcshell and plugin-container as CET compatible. r=glandium
We will only run the processes in CET compatible modules only mode when not
using the JIT code. So marking xul.dll as compatible should be OK.

Differential Revision: https://phabricator.services.mozilla.com/D117551
2021-07-19 07:36:19 +00:00
Jed Davis 4737104967 Bug 1440103 - Fix handle leak in IPC process launching. r=handyman
We use the process handle returned from `CreateProcess` to derive
another handle with more permissions, but the original handle is never
closed.  This bug appears to be fairly old: it existed before this code
was converted to use MozPromise.

Currently we provide the original handle to external consumers of the
launch promise; this patch resolves the promise with the privileged
handle instead and closes the original one.  (One consumer uses the
handle only to obtain the pid, and the rest don't use it at all, so this
shouldn't change anything.)

As a related cleanup, `ProcessLaunchPromise` is now exclusive (because
it's resolved with resources which are consumed) and no longer declared
in the header file (because it's used only internally).

Differential Revision: https://phabricator.services.mozilla.com/D119820
2021-07-15 22:20:34 +00:00
Florian Quèze ca7bbcc752 Bug 1720374 - Remove MOZ_GECKO_PROFILER ifdefs that are not useful, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D119810
2021-07-15 22:04:23 +00:00
Florian Quèze 57d1e300f5 Bug 1720362 - Remove the last MOZ_GECKO_PROFILER ifdefs in ipc code, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D119801
2021-07-15 22:04:22 +00:00
Nika Layzell 7ad5d70418 Bug 1718333 - Remove unnecessary AssertLinkThread assertions, r=handyman
After looking through the methods which have this assertion, I couldn't
find any examples of places where not having a specific "link thread"
sequence would cause any issues. I think these assertions can and should
be removed.

The main change required by this was to remove the `!NS_IsMainThread()`
assertion from the SchedulerGroup listener. Due to how callbacks work,
it would be possible for a vsync message to be detected by a
MessageChannel from the main thread if it was sent before the channel
was bound. I don't believe that this change should cause any issues.

Differential Revision: https://phabricator.services.mozilla.com/D119348
2021-07-15 21:09:55 +00:00
Nika Layzell e620d25a35 Bug 1715167 - Part 6: Use the unsandboxed result principal as precursor for sandbox principals, r=ckerschb,ngogge
This change stores a generated nsID directly on the LoadInfo, rather
than the full SandboxedLoadingPrincipal. This allows for the sandboxed
principal to be constructed from GetChannelResultPrincipal using the
unsandboxed result principal as a precursor, rather than the loading
principal.

The nsID is reset by HttpChannelBase whenever a non-internal redirect
occurs to reduce the chance of multiple null result principals during a
redirect with the same nsID, but different precursors.

Depends on D119692

Differential Revision: https://phabricator.services.mozilla.com/D119693
2021-07-15 21:09:15 +00:00