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

21708 Коммитов

Автор SHA1 Сообщение Дата
Marian-Vasile Laza 7852c208be Backed out 2 changesets (bug 1754063, bug 1744043) for causing xpcshell failures on test_ext_clear_cached_resources.js. CLOSED TREE
Backed out changeset faf305b1b14d (bug 1754063)
Backed out changeset 24ee1c0756ae (bug 1744043)
2022-03-08 09:08:23 -08:00
Randell Jesup da56412fd6 Bug 1744043: Clean up nsJAR r=nika,valentin
Differential Revision: https://phabricator.services.mozilla.com/D132794
2022-03-08 13:57:56 +00:00
Narcis Beleuzu 5d43a306d3 Merge central to autoland. CLOSED TREE 2022-03-08 15:06:49 +02:00
Gerald Squelart 5802980a6e Bug 1757596 - #include "mozilla/ProfilerThreadSleep.h" instead of GeckoProfiler.h where possible - r=florian
And in one case, #include "mozilla/ProfilerThreadState.h" where only `AUTO_PROFILER_THREAD_WAKE` is used.

Depends on D140172

Differential Revision: https://phabricator.services.mozilla.com/D140173
2022-03-08 10:32:44 +00:00
Mozilla Releng Treescript 5c2afb69bf Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2022-03-08 10:07:48 +00:00
Nika Layzell 14e4d6be72 Bug 1754037 - Part 2: Forward declare Message{Reader,Writer} where Message is forward declared, r=ipc-reviewers,mccr8
This will allow the types to be more easily automatically substituted in place
of `IPC::Message`, as the type will already be declared in places it is used.

Differential Revision: https://phabricator.services.mozilla.com/D140000
2022-03-04 15:39:39 +00:00
Emilio Cobos Álvarez e7bfa879da Bug 1736218 - Expose theme-derived color-scheme to privileged code. r=Gijs
This will be needed to determine whether following the Firefox theme
would produce light or dark colors.

Differential Revision: https://phabricator.services.mozilla.com/D140221
2022-03-04 13:08:30 +00:00
Jan Rio Krause 10f92fad6c Bug 1757754 - Fix MinGW build failure by defining `ERROR_CONTENT_BLOCKED`. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D140212
2022-03-04 05:52:19 +00:00
Butkovits Atila f71a8aad71 Backed out 2 changesets (bug 1756505) for causing hazard failures. CLOSED TREE
Backed out changeset 3622bb57fb67 (bug 1756505)
Backed out changeset d0e31f4a0ee1 (bug 1756505)
2022-03-04 00:10:46 +02:00
Gabriele Svelto 27a8871e0b Bug 1756505 - Remove the ThreadIdNameMapping annotation and all the associated machinery r=Gankra
This has several implications:
* A race-condition that could manifest itself both on macOS and Linux is
  removed. The race could happen if we took the lock to the thread name
  mapping while another suspended thread was in the memory allocator. Taking
  the lock required an allocation thus the thread acting within the exception
  handler would get stuck.
* We save a few KiBs of memory per process since we don't have to keep the
  thread name mapping around.
* Thread startup will be slightly faster since the first thing each new thread
  did was to fill its own mapping.

Differential Revision: https://phabricator.services.mozilla.com/D139319
2022-03-03 14:18:46 +00:00
Steve Fink c4fe49a03c Bug 1661293 - Make nsJSContext::MaybePokeGC trigger EAGER_ALLOC_TRIGGER major GCs instead of just eager minor GCs r=jonco,smaug
Differential Revision: https://phabricator.services.mozilla.com/D100368
2022-03-03 04:21:48 +00:00
Steve Fink c3b0f38d01 Bug 1661293 - Move idle-time nursery GCs to a new nsJSContext::MaybePokeGC r=jonco,smaug
Differential Revision: https://phabricator.services.mozilla.com/D100367
2022-03-03 04:21:47 +00:00
Steve Fink 2b82b28cfd Bug 1661293 - Rename JS::RunIdleGCTask -> JS::MaybeRunNurseryCollection and pass through the reason, also rename IDLE_TIME_COLLECTION -> EAGER_NURSERY_COLLECTION. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D139208
2022-03-03 04:21:47 +00:00
Jan Rio Krause f1571e65c4 Bug 1690326 - Map Windows error `0x510 ERROR_CONTENT_BLOCKED` to `NS_ERROR_FILE_ACCESS_DENIED`. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D139968
2022-03-02 14:10:19 +00:00
Jeff Muizelaar 2f82844d6b Bug 1757565 - Explicitly cast from size_t to uint32_t in nsTStringLengthStorage. r=xpcom-reviewers,mccr8
I was looking at what all fails with -Werror=shorten-64-to-32
and this showed up prominently.

Differential Revision: https://phabricator.services.mozilla.com/D139940
2022-03-01 16:06:23 +00:00
Gerald Squelart 2fa78ca017 Bug 1668867 - Move parts of GeckoProfiler.h into ProfilerControl.h - r=canaltinova
This profiler-controlling functions are used in very few places, so it's good to have them in a separate header to reduce dependencies.

On top of making GeckoProfiler.h lighter, this is actually needed for this bug, because a later patch adds MozPromise to profiler_start and others, which would have created a header loop (GeckoProfiler -> MozPromise -> Monitor -> CondVar -> GeckoProfiler) that makes the build fail.

Differential Revision: https://phabricator.services.mozilla.com/D139331
2022-03-01 06:56:00 +00:00
Mike Hommey 526e84fa47 Bug 1757122 - Replace unqualified uses of std::move. r=xpcom-reviewers,media-playback-reviewers,mccr8,bryce
Clang trunk added a warning about unqualified uses of std::move.
https://reviews.llvm.org/D119670

Differential Revision: https://phabricator.services.mozilla.com/D139681
2022-03-01 04:15:26 +00:00
Nika Layzell 2f62d8c857 Bug 1751948 - Part 6: Add basic support for running IPDL unit tests during gtest, r=ipc-reviewers,andi,handyman
This patch introduces a new system for building IPDL unit tests, which is
roughly inspired by the old cxx unit test design, however designed to work with
gtest. It re-uses the existing IPDLUnitTest process type, using static
constructors only present in xul-gtest to register child actor constructors and
ProcessChild implementations to avoid bloating xul.

The IPDLUnitTest actor is used as a backchannel to communicate test failures
from the child process back to the parent process, and manage the test's async
lifecycle more reliably.

The IPDLUnitTest process also needed to have various properties about how it was
initialized adjusted:

* The IPDLUnitTest process should now always load xul-gtest when running
  gtests, by using the "Self" process type and adding a DYLD_LIBRARY_PATH override
  on macOS where the "Self" process type cannot be used.
* The IPDLUnitTest process now initializes minimal XPCOM, and runs a
  frankeneventloop to allow it to use XPCOM event loop structures such as
  SpinEventLoopUntil in tests.
* Support for creating IPDLUnitTest processes on Android was added, as these
  tests had never run on android before.

Differential Revision: https://phabricator.services.mozilla.com/D137170
2022-02-28 21:01:49 +00:00
Gerald Squelart f5dec38bf8 Bug 1757100 - Sprinkle [[nodiscard]] and =delete in RWLock.h - r=glandium,xpcom-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D139680
2022-02-27 23:32:56 +00:00
Gerald Squelart 97bc60386d Bug 1757100 - Move minimal platform-dependent part of RWLock to mozglue/misc/PlatformRWLock.h&cpp - r=glandium,xpcom-reviewers
This is consistent with how xpcom's Mutex has its platform-dependent code in mozglue, and will allow readers-writer locks in mozglue without duplication.

Differential Revision: https://phabricator.services.mozilla.com/D139669
2022-02-27 23:32:55 +00:00
Olli Pettay 1edf4c885e Bug 1754562, make parent process' idle detection be aware of active RefreshDrivers in the other processes, r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D138504
2022-02-26 22:37:03 +00:00
criss d17f55ed9f Backed out changeset 39bd7bdd12be (bug 1754562) for causing multiple failures. CLOSED TREE 2022-02-25 13:40:50 +02:00
Olli Pettay 89b093258f Bug 1754562, make parent process' idle detection be aware of active RefreshDrivers in the other processes, r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D138504
2022-02-25 10:13:16 +00:00
Chris Peterson 4c1f824528 Bug 1756504 - Remove cpp-virtual-final linter, a minor style check that doesn't diagnose real bugs. r=firefox-static-analysis-reviewers,sylvestre
In bug 1436263, I added a cpp-virtual-final.yml linter to warn about virtual function declarations that included more than one virtual function specifier `virtual`, `final`, or `override`.

I think we should remove this linter now because:

* It's just a style check and doesn't diagnose a real bug. Including more than one virtual function specifier (`virtual`, `final`, or `override`) is harmless and unambiguous, just unnecessary extra code.
* It has caused some engineer frustration because this style check caused their changeset to be backed out of autoland. Backing out and fixing these style issues are not a good use of sheriffs' or engineers' time.
* It doesn't catch all virtual/final/override style issues because:
  * It can't analyze virtual function definitions that span multiple lines.
  * It doesn't check for `virtual void Foo() override` because  there are over 6000 cases already, so our code will never follow this style check consistently.

Differential Revision: https://phabricator.services.mozilla.com/D139454
2022-02-24 02:14:39 +00:00
Kagami Sascha Rosylight ed9bb84c5d Bug 1755594 - Part 1: Add NS_IMPL_CYCLE_COLLECTION_WITH_JS_MEMBERS r=mccr8,smaug
Differential Revision: https://phabricator.services.mozilla.com/D138903
2022-02-23 13:44:01 +00:00
Csoregi Natalia dafaf9d404 Backed out 2 changesets (bug 1755594) for causing bp-hybrid bustage on TeeState.cpp. CLOSED TREE
Backed out changeset 82a58b494f74 (bug 1755594)
Backed out changeset b347a6be8478 (bug 1755594)
2022-02-23 04:25:02 +02:00
Kagami Sascha Rosylight 76a997af6d Bug 1755594 - Part 1: Add NS_IMPL_CYCLE_COLLECTION_WITH_JS_MEMBERS r=mccr8,smaug
Differential Revision: https://phabricator.services.mozilla.com/D138903
2022-02-23 01:20:25 +00:00
Paul Bone 5e97d6f437 Bug 1704996 - Account for Apple Aarch64 shared memory region r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D139254
2022-02-22 23:42:08 +00:00
Randell Jesup 3c5324da79 Bug 1746495: xpcom/threads misc cleanup r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D134064
2022-02-22 13:00:54 +00:00
Emilio Cobos Álvarez 09ffd60801 Bug 1756500 - Store OriginTrials in Document. r=smaug
Use the http-equiv meta code-path to handle it. No tests yet,
because for now we're not using any key so verification
would always fail.

Differential Revision: https://phabricator.services.mozilla.com/D139314
2022-02-21 21:12:04 +00:00
Kagami Sascha Rosylight d91c23ad97 Bug 1756070 - Part 1: Add missing `override` keywords r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D139166
2022-02-21 13:50:12 +00:00
Masatoshi Kimura 97d32e6c03 Bug 1751840 - Make nsLocalFileWin::Equals compare long names before trying 8.3 names. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D137339
2022-02-19 12:37:10 +00:00
Marian-Vasile Laza 1a03e480e1 Backed out 7 changesets (bug 1751948) for causing gtest failures. CLOSED TREE
Backed out changeset 52f5eaeb4340 (bug 1751948)
Backed out changeset e68c91f0ee8c (bug 1751948)
Backed out changeset 6198b0a5e72a (bug 1751948)
Backed out changeset d9bd956b3935 (bug 1751948)
Backed out changeset 4ac102698b52 (bug 1751948)
Backed out changeset ab9f87d2451e (bug 1751948)
Backed out changeset 63545319b2dd (bug 1751948)
2022-02-19 05:37:20 +02:00
Byron Campen 3b97239dc6 Bug 1754867: Use unique_ptr instead of Maybe for mTailDispatcher to avoid reentrancy. r=nika
The core of the problem here is that Maybe::reset invokes the d'tor first, and
then clears the value, whereas unique_ptr::reset does the opposite.

Differential Revision: https://phabricator.services.mozilla.com/D138564
2022-02-19 01:49:21 +00:00
Nika Layzell eb34a2c6dd Bug 1751948 - Part 6: Add basic support for running IPDL unit tests during gtest, r=ipc-reviewers,andi,handyman
This patch introduces a new system for building IPDL unit tests, which is
roughly inspired by the old cxx unit test design, however designed to work with
gtest. It re-uses the existing IPDLUnitTest process type, using static
constructors only present in xul-gtest to register child actor constructors and
ProcessChild implementations to avoid bloating xul.

The IPDLUnitTest actor is used as a backchannel to communicate test failures
from the child process back to the parent process, and manage the test's async
lifecycle more reliably.

The IPDLUnitTest process also needed to have various properties about how it was
initialized adjusted:

* The IPDLUnitTest process should now always load xul-gtest when running
  gtests, by using the "Self" process type and adding a DYLD_LIBRARY_PATH override
  on macOS where the "Self" process type cannot be used.
* The IPDLUnitTest process now initializes minimal XPCOM, and runs a
  frankeneventloop to allow it to use XPCOM event loop structures such as
  SpinEventLoopUntil in tests.
* Support for creating IPDLUnitTest processes on Android was added, as these
  tests had never run on android before.

Differential Revision: https://phabricator.services.mozilla.com/D137170
2022-02-19 00:57:38 +00:00
Dave Townsend 132e989d44 Bug 1756148: Setting a thread's affinity is not supported on ARM64 chipset on macOS. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D139110
2022-02-18 20:20:35 +00:00
Randell Jesup 4b8e38023f Bug 1746500: xpcom Threadpool cleanup r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D134068
2022-02-18 19:39:50 +00:00
Jens Stutte 8dc1e5affa Bug 1750635: Substitute AppShutdown:IsShuttingDown with equivalent AppShutdown::IsInOrBeyond. r=florian,xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D139143
2022-02-18 19:35:13 +00:00
Kershaw Chang fc9473085a Bug 1754491 - Introduce new error code - NS_ERROR_WEBSOCKET_CONNECTION_REFUSED, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D138891
2022-02-18 14:02:15 +00:00
Emilio Cobos Álvarez 00f5ea846d Bug 1755896 - Add support from AString to ACString Base64 decoding. r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D139029
2022-02-18 10:42:10 +00:00
Tom Ritter cfbe02ff6e Bug 1750859: If not all decoders are remoted, you're disqualified from win32k r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D139043
2022-02-17 18:59:17 +00:00
Sean Feng 475ea61051 Bug 1755226 - Only notify 'http-on-image-cache-response' when there are registered observers r=tnikkel,emilio
This is an optimization to avoid doing redundant things when there are no
registered observers.

Differential Revision: https://phabricator.services.mozilla.com/D138853
2022-02-17 14:53:10 +00:00
stransky f3f1b9f256 Bug 1670817 Add a new NS_ERROR_DOM_MEDIA_REMOTE_DECODER_CRASHED_ERR error type r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D138268
2022-02-17 10:32:00 +00:00
Timothy Nikkel cd084cd10a Bug 1755290. Don't descend into the chrome tabbar when looking for an async scrollable element to create a display port on. r=botond,emilio
A basic Firefox window has no element that WantAsyncScroll in the parent process, even if there are enough tabs to overflow the tabbar and make it scroll. This is because the underlying element is overflow hidden.

The tabbar is an arrowscrollbox

https://searchfox.org/mozilla-central/rev/e66593593f3b356901011ea0fcdf9979728e9ae8/browser/base/content/navigator-toolbox.inc.xhtml#56

Which is implemented here

https://searchfox.org/mozilla-central/rev/e66593593f3b356901011ea0fcdf9979728e9ae8/toolkit/content/widgets/arrowscrollbox.js#33

using a <scrollbox> element. These are meant to be programtically scrolled but not user scrolled, hence they are declared overflow hidden here

https://searchfox.org/mozilla-central/rev/e66593593f3b356901011ea0fcdf9979728e9ae8/toolkit/content/xul.css#540

and they have been that way since the early 2000s, so doesn' seem likely to change. overflow: hidden element do not WantAsyncScroll

https://searchfox.org/mozilla-central/rev/e66593593f3b356901011ea0fcdf9979728e9ae8/layout/generic/nsGfxScrollFrame.cpp#1691

If the tabbar structure/name changes I left a comment there pointing out this code.

In a session with a lot of tabs this code can be 15% of the total parent process time to open a new tab. With this patch it's pretty much zero.

Differential Revision: https://phabricator.services.mozilla.com/D138650
2022-02-16 20:20:49 +00:00
Butkovits Atila 45b52988f2 Backed out changeset 480ba71887c8 (bug 1755226) for causing build bustages. CLOSED TREE 2022-02-16 21:09:15 +02:00
Sean Feng c87da83fd7 Bug 1755226 - Only notify 'http-on-image-cache-response' when there are registered observers r=tnikkel
This is an optimization to avoid doing redundant things when there are no
registered observers.

Differential Revision: https://phabricator.services.mozilla.com/D138853
2022-02-16 17:57:39 +00:00
Haik Aftandilian 647c332747 Bug 1755409 - aarch64 Darwin fails to build with --disable-sandbox r=spohl
Make GetAppPath() defined on Mac aarch64 builds even without MOZ_SANDBOX because aarch64 builds may use it for Rosetta pre-translation.

Differential Revision: https://phabricator.services.mozilla.com/D138751
2022-02-15 16:15:21 +00:00
Jon Coppeard 495e25eed1 Bug 1753958 - Part 3: Add a GCOption for shutdown GCs and use this rather than checking the GCReason r=sfink,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D138555
2022-02-15 09:45:06 +00:00
Nika Layzell de1e97c891 Bug 1754040 - Clean up common shared WriteSegments helper functions, r=necko-reviewers,xpcom-reviewers,mccr8
These helper methods are similar to the related ones for
nsIInputStream::ReadSegments, and can be used to implement
nsIOutputStream::Write and nsIOutputStream::WriteFrom in terms of
WriteSegments.

There were various places which used manual copies of these methods, which are
being unified.

Differential Revision: https://phabricator.services.mozilla.com/D138334
2022-02-14 23:59:35 +00:00
Jan de Mooij 28e6a9a093 Bug 1754405 part 14 - Rename PropertyKey::fromNonIntAtom to PropertyKey::NonIntAtom. r=evilpie
Differential Revision: https://phabricator.services.mozilla.com/D138423
2022-02-13 12:01:49 +00:00