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

6683 Коммитов

Автор SHA1 Сообщение Дата
Kagami Sascha Rosylight b393a76883 Bug 1725942 - Part 3: Migrate LockManager implementation to PLockManager r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D125555
2021-10-19 12:01:51 +00:00
Kagami Sascha Rosylight 1b81c6c3a4 Bug 1725942 - Part 2: Add ipc::ParamTraits for dom::Sequence r=ipc-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D126242
2021-10-19 12:01:50 +00:00
Nika Layzell 8d97cd8228 Bug 1725572 - Part 1: Support automatic cleanup for ManagedEndpoint instances, r=handyman
This patch adds support for ManagedEndpoint instances to be dropped &
gracefully destroyed. Before this change, a ManagedEndpoint which was
dropped without being bound would not clean up its' peer actor, meaning
that messages to and from that actor would be discarded.

This is done by adding a new actor destroy reason for dropping a
ManagedEndpoint.

Differential Revision: https://phabricator.services.mozilla.com/D128776
2021-10-18 22:59:17 +00:00
Mike Hommey 7debb35262 Bug 1572618 - Statically link the rlbox library to libxul. r=firefox-build-system-reviewers,nika,andi
We still rely on dynamic loading to find the symbols, but since we get
them from libxul, we don't need to load the library before activating
the process sandbox anymore.

Differential Revision: https://phabricator.services.mozilla.com/D128333
2021-10-15 01:17:58 +00:00
Thinker Li d608329c0a Bug 1697429 - Handle crash with the old way if the fork server is prefed out. r=jld
Handle crash with the old way if the fork server is prefed out, and waitpid() for all available stat changes of children processes in the forkserver.

Differential Revision: https://phabricator.services.mozilla.com/D110507
2021-10-14 03:13:00 +00:00
Noemi Erli ee28b70fed Backed out changeset 88ae7d2397eb (bug 1697429) for causing bustages in process_util_posix.cc 2021-10-08 03:05:56 +03:00
Thinker Li 956b05e8b1 Bug 1697429 - Handle crash with the old way if the fork server is prefed out. r=jld
Handle crash with the old way if the fork server is prefed out, and waitpid() for all available stat changes of children processes in the forkserver.

Differential Revision: https://phabricator.services.mozilla.com/D110507
2021-10-07 23:42:22 +00:00
Jens Stutte 0a2448163d Bug 1731564: Use motivated SpinEventLoopUntil inside ipc/*. r=ipc-reviewers,nika
Depends on D127100

Differential Revision: https://phabricator.services.mozilla.com/D127102
2021-10-07 08:06:12 +00:00
Marian-Vasile Laza 18fb16c542 Backed out 18 changesets (bug 1731564) for causing build bustages on SpinEventLoopUntil. CLOSED TREE
Backed out changeset 0464dbdc8584 (bug 1731564)
Backed out changeset 0d996df13545 (bug 1731564)
Backed out changeset 5630a0e7a109 (bug 1731564)
Backed out changeset 37b41d187cdb (bug 1731564)
Backed out changeset d37700fa60b6 (bug 1731564)
Backed out changeset b0ce7db44b99 (bug 1731564)
Backed out changeset aa5ec3aa1535 (bug 1731564)
Backed out changeset 73b648f1fa70 (bug 1731564)
Backed out changeset bb8fb0f9833e (bug 1731564)
Backed out changeset 0d8905144f5d (bug 1731564)
Backed out changeset 2cfb094a1ec3 (bug 1731564)
Backed out changeset 78d3b0257a6a (bug 1731564)
Backed out changeset e9d32926e93c (bug 1731564)
Backed out changeset 874cab520ce5 (bug 1731564)
Backed out changeset d8071cc32bd9 (bug 1731564)
Backed out changeset 283c5393cbbc (bug 1731564)
Backed out changeset 317bc38e3de5 (bug 1731564)
Backed out changeset 53e3f4862439 (bug 1731564)
2021-10-07 00:09:19 +03:00
Jens Stutte 4c843c7054 Bug 1731564: Use motivated SpinEventLoopUntil inside ipc/*. r=ipc-reviewers,nika
Depends on D127100

Differential Revision: https://phabricator.services.mozilla.com/D127102
2021-10-06 19:45:13 +00:00
Petr Sumbera 7ee3993e66 Bug 1732325 - SharedMemory::FindFreeAddressSpace should use MAP_NORESERVE r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D126510
2021-10-01 08:16:37 +00:00
Alexandre Lissy 9a7966a721 Bug 1732999 - Annotate intentional crash when testing buildid mismatch r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D126905
2021-09-29 13:47:00 +00:00
Eitan Isaacson 1de5b0abcd Bug 1731374 - Add string storage to AccAttributes with move semantics. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D126012
2021-09-28 22:01:35 +00:00
Jed Davis fb5243f075 Bug 1715414 - Start PBackground earlier in content processes. r=nika
Previously we were staring `PBackground` in content processes in
response to receiving the `SetXPCOMProcessAttributes` IPC message, which
is sent immediately after the process is launched.  Meanwhile, the
idle scheduler tries to use PBackground when the main thread considers
itself idle.  But if thread scheduling is such that the content process
main thread becomes idle before the IPC I/O thread has received and
dispatched that message, then we have a problem (signaled by an assertion
failure).

This patch moves content process `PBackground` startup earlier, to the
end of `ContentProcess::Init`; that point is after enough of IPC and
XPCOM is started for it to work, but before we start spinning the main
thread event loop.

Differential Revision: https://phabricator.services.mozilla.com/D126144
2021-09-28 19:13:15 +00:00
criss a8345dc602 Backed out changeset 671ba1530436 (bug 1715414) for casuing bustages on ContentProcess.cpp. CLOSED TREE 2021-09-28 07:33:53 +03:00
Jed Davis 86b3598e72 Bug 1715414 - Start PBackground earlier in content processes. r=nika
Previously we were staring `PBackground` in content processes in
response to receiving the `SetXPCOMProcessAttributes` IPC message, which
is sent immediately after the process is launched.  Meanwhile, the
idle scheduler tries to use PBackground when the main thread considers
itself idle.  But if thread scheduling is such that the content process
main thread becomes idle before the IPC I/O thread has received and
dispatched that message, then we have a problem (signaled by an assertion
failure).

This patch moves content process `PBackground` startup earlier, to the
end of `ContentProcess::Init`; that point is after enough of IPC and
XPCOM is started for it to work, but before we start spinning the main
thread event loop.

Differential Revision: https://phabricator.services.mozilla.com/D126144
2021-09-28 02:02:19 +00:00
Mike Hommey 87a967bf85 Bug 1732208 - Silence the unused-but-set-variable warning in ipc. r=mccr8
ipc/chromium/src/chrome/common/ipc_channel_win.cc(133,8): error: variable 'waited' set but not used [-Werror,-Wunused-but-set-variable]
  bool waited = false;
       ^
ipc/mscom/InterceptorLog.cpp(183,12): error: variable 'rv' set but not used [-Werror,-Wunused-but-set-variable]
  nsresult rv = mThread->Dispatch(
           ^

Differential Revision: https://phabricator.services.mozilla.com/D126455
2021-09-28 00:02:45 +00:00
Tim Huang 93a518fe4f Bug 1731557 - Part 1: Using an enum to represent storage permission in the loadInfo. r=pbz,necko-reviewers,dragana
To differentiate the storage permission is granted by either the
permission or the allowList, we need to change the hasStoragePermission
to an enum to represent the storage permission state.

This patch also changes the name of the attribute to make it reasonable
with respect to this change.

Differential Revision: https://phabricator.services.mozilla.com/D126276
2021-09-27 22:50:41 +00:00
Bob Owen 972b41f513 Bug 1546154 p3: Explicitly load COM functions from combase.dll to prevent ole32 loading. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D124931
2021-09-20 10:09:01 +00:00
Bob Owen ced8f2090a Bug 1546154 p1: Call CommandLineToArgvW via API set when possible to prevent shell32 loading. r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D124928
2021-09-20 10:08:59 +00:00
Marian-Vasile Laza 1cf4af94e5 Backed out 7 changesets (bug 1546154) for causing build bustages on ContentProcess.cpp. CLOSED TREE
Backed out changeset 0bd777eee249 (bug 1546154)
Backed out changeset 611812ee62a2 (bug 1546154)
Backed out changeset cef0aa18a3ab (bug 1546154)
Backed out changeset cfda47fb0a46 (bug 1546154)
Backed out changeset f3e005f5fedc (bug 1546154)
Backed out changeset 7f50fca0c2cd (bug 1546154)
Backed out changeset bbb0b25450f5 (bug 1546154)
2021-09-15 14:12:55 +03:00
Bob Owen 8b6ae95727 Bug 1546154 p3: Explicitly load COM functions from combase.dll to prevent ole32 loading. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D124931
2021-09-15 10:21:04 +00:00
Bob Owen 461bc82ee8 Bug 1546154 p1: Call CommandLineToArgvW via API set when possible to prevent shell32 loading. r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D124928
2021-09-15 10:21:03 +00:00
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