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

484 Коммитов

Автор SHA1 Сообщение Дата
sotaro b9e60f30de Bug 1778431 - Allocate canvas render thread for out-of-process WebGL r=gfx-reviewers,aosmond
If dedicated thread for out-of-process WebGL exists, compositor thread tasks are not delayed by WebGL tasks.

And Bug 1712486 requests that WebGL run on non-compositor thread.

Differential Revision: https://phabricator.services.mozilla.com/D151210
2022-07-08 04:02:41 +00:00
Narcis Beleuzu 94e1afa8c3 Backed out 2 changesets (bug 1776104) as requested by Andi
Backed out changeset c2f124ed65ec (bug 1776104)
Backed out changeset 05da7d6fa999 (bug 1776104)
2022-07-06 19:15:18 +03:00
Kagami Sascha Rosylight b8a6ac5e51 Bug 1777408 - Prefer Handle/RootedVector when replacing Handle/Rooted*Vector typedefs r=andi
`JS::{Handle/Rooted}Vector<T>` are straightforward enough and way shorter than `JS::{Handle/Rooted}<JS::StackGCVector<T>>` (too many special characters). The linter currently does not prevent the use of them, so for now let's prefer them for replacements.

Differential Revision: https://phabricator.services.mozilla.com/D150696
2022-06-30 16:29:30 +00:00
Ryan VanderMeulen ce4ab516bb Bug 1776104 - Verify that the paths exist before writing ThirdPartyPaths.cpp. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D150069
2022-06-27 13:05:46 +00:00
Nika Layzell 7086a045e0 Bug 1743020 - Part 1: Opt third-party paths out of NoExplicitMoveConstructor checker, r=andi
The function2 library uses an explicit move constructor internally,
which would trigger this checker, and cause a build failure.

Differential Revision: https://phabricator.services.mozilla.com/D145689
2022-06-02 13:24:09 +00:00
Kagami Sascha Rosylight a9e8954b79 Bug 1765832 - Part 1: Restrict MOZ_KNOWN_LIVE to be modifiable only by constructor/destructors r=andi
Differential Revision: https://phabricator.services.mozilla.com/D146023
2022-05-18 18:07:00 +00:00
criss 441a887295 Backed out 3 changesets (bug 1765832) for causing build bustages on Transferable.cpp
Backed out changeset c7c5a5208d60 (bug 1765832)
Backed out changeset 05a53421e1d8 (bug 1765832)
Backed out changeset 87cf3ec70aab (bug 1765832)
2022-05-18 16:28:24 +03:00
Kagami Sascha Rosylight 07b6302656 Bug 1765832 - Part 1: Restrict MOZ_KNOWN_LIVE to be modifiable only by constructor/destructors r=andi
Differential Revision: https://phabricator.services.mozilla.com/D146023
2022-05-18 12:57:44 +00:00
Kagami Sascha Rosylight 2a6bc5e42d Bug 1769494 - Exclude xpc from JSHandleRootedTypedefChecker r=andi
XPC also follows SpiderMonkey rule so it should be excluded for now. This will reduce a good amount of warnings.

Differential Revision: https://phabricator.services.mozilla.com/D146497
2022-05-18 10:38:10 +00:00
Mike Hommey 8e398f6502 Bug 1768996 - Add LLVM-15 compatibility to MozsearchIndexer.cpp. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D146151
2022-05-14 13:44:50 +00:00
Molnar Sandor 74e42d0f2f Backed out 5 changesets (bug 1743020) for causing linux build bustages in function2.hpp CLOSED TREE
Backed out changeset cf237471cf75 (bug 1743020)
Backed out changeset 78eb51447ce5 (bug 1743020)
Backed out changeset c486f95d55ec (bug 1743020)
Backed out changeset c0abfda55404 (bug 1743020)
Backed out changeset 16be18ca73fb (bug 1743020)
2022-05-14 10:31:12 +03:00
Nika Layzell 960eaeae92 Bug 1743020 - Part 1: Opt third-party paths out of NoExplicitMoveConstructor checker, r=andi
The function2 library uses an explicit move constructor internally,
which would trigger this checker, and cause a build failure.

Differential Revision: https://phabricator.services.mozilla.com/D145689
2022-05-13 23:43:51 +00:00
Kagami Sascha Rosylight 31b6df6028 Bug 1766038 - Prefer full qualified types over typedefs for JS::Handle/Rooted r=andi,sfink
Differential Revision: https://phabricator.services.mozilla.com/D145802
2022-05-13 22:45:51 +00:00
Narcis Beleuzu c641ca6aa7 Backed out 2 changesets (bug 1766038) for SM bustages . CLOSED TREE
Backed out changeset 01bec52b2ba3 (bug 1766038)
Backed out changeset cfcc7c859257 (bug 1766038)
2022-05-13 22:54:28 +03:00
Iulian Moraru 1a0666e8ec Bug 1766038 - fix black lint failures on moz.build. r=fix CLOSED TREE 2022-05-13 21:53:16 +03:00
Kagami Sascha Rosylight 66628d8729 Bug 1766038 - Prefer full qualified types over typedefs for JS::Handle/Rooted r=andi,sfink
Differential Revision: https://phabricator.services.mozilla.com/D145802
2022-05-13 18:02:47 +00:00
Christian Holler 0ccdc33183 Bug 1756778 - Integrate top-level IPC fuzzing. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D139471
2022-05-05 15:39:24 +00:00
Mike Hommey 548aade9e4 Bug 1758780 - Update builders to clang 14. r=firefox-build-system-reviewers,mhentges,andi
Differential Revision: https://phabricator.services.mozilla.com/D143175
2022-04-21 04:36:24 +00:00
Narcis Beleuzu 0fd7ae053e Backed out 2 changesets (bug 1758780) for jsreftest failure on fp-evaluation-order.js . CLOSED TREE
Backed out changeset 10e2414392ae (bug 1758780)
Backed out changeset 481062597411 (bug 1758780)
2022-04-20 03:03:26 +03:00
Mike Hommey e778621ee4 Bug 1758780 - Update builders to clang 14. r=firefox-build-system-reviewers,mhentges,andi
Differential Revision: https://phabricator.services.mozilla.com/D143175
2022-04-19 08:08:45 +00:00
Noemi Erli dff8ae5ed1 Backed out 2 changesets (bug 1758780) for causing OSX failures
Backed out changeset 2a3c0204b519 (bug 1758780)
Backed out changeset 330065f83d19 (bug 1758780)
2022-04-13 14:08:51 +03:00
Mike Hommey 72f2af9431 Bug 1758780 - Update builders to clang 14. r=firefox-build-system-reviewers,mhentges,andi
Differential Revision: https://phabricator.services.mozilla.com/D143175
2022-04-13 05:09:09 +00:00
Butkovits Atila 3ce125b3f7 Backed out 2 changesets (bug 1758780) as per request by dev. CLOSED TREE
Backed out changeset 0f6aff1f340e (bug 1758780)
Backed out changeset e390fac06dae (bug 1758780)
2022-04-13 07:53:43 +03:00
Mike Hommey d0e55e7fec Bug 1758780 - Update builders to clang 14. r=firefox-build-system-reviewers,mhentges,andi
Differential Revision: https://phabricator.services.mozilla.com/D143175
2022-04-13 04:35:11 +00:00
Mike Hommey 752b35b2cf Bug 1758780 - Avoid linking libclang both statically and dynamically. r=firefox-build-system-reviewers,andi
This applies the same as https://reviews.llvm.org/D81967 to our
CMakeLists.txt. Interestingly, the upstream change landed in LLVM 11,
but not applying the same on our end doesn't cause problems until LLVM
14.

Differential Revision: https://phabricator.services.mozilla.com/D143172
2022-04-13 03:02:24 +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
Masayuki Nakano 8d88df10f6 Bug 1718825 - Treat strong pointers which are members of class/struct and marked as `MOZ_KNOWN_LIVE` as safe r=andi
`MOZ_KNOWN_LIVE RefPtr<Foo> mFoo` is not treated as safe because its raw pointer
is referred with operators but they are not checked at handling `MOZ_KNOWN_LIVE`
annotation.

Additionally, when members marked as `MOZ_KNOWN_LIVE` are in the stack, they
are also not treated as safe, but they should be safe in most cases.

With these changes, `HTMLTableEditor.cpp` can get rid of a lot of
`MOZ_KnownLive` method calls.

Differential Revision: https://phabricator.services.mozilla.com/D136122
2022-02-02 00:48:19 +00:00
Jan-Ivar Bruaroey f144f24866 Bug 1225722 - Less restrictive non-memmovable static analysis of std::tuple. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D137573
2022-02-01 23:12:30 +00:00
Kagami Sascha Rosylight 901a35ec10 Bug 1748874 - Part 5: Require CAN_RUN_SCRIPT to be at the first declaration r=andi
Depends on D135404

Differential Revision: https://phabricator.services.mozilla.com/D135405
2022-01-11 11:52:27 +00:00
Nika Layzell fb07e18588 Bug 1744604 - Part 4: Make the alignas lint behave more consistently across platforms, r=andi
On aarch64 and x86-64 windows, the behaviour of canPassInRegisters is slightly
different than other platforms, accepting types to be passed in registers which
wouldn't be passed in registers on other platforms. This causes the lint to
behave slightly differently on that platform. This patch changes the lint to
always follow the non-win64 behaviour required by the C++ standard.

Depends on D132997

Differential Revision: https://phabricator.services.mozilla.com/D133685
2021-12-14 16:49:18 +00:00
Nika Layzell 5c13f41dd5 Bug 1744604 - Part 3: Relax the alignas lint to be more accurate to the potential alignment issue, r=andi
The platform in question which triggered this lint being added is the windows
x86 ABI, which pre-msvc version 19.14 emitted an error when passing complex
aggregate types as parameters due to not being able to align them.
Unfortunately modern versions of Clang still have a bug in the implementation
of the post-19.14 ABI and will pass types with incorrect alignments.

This change makes the intended behaviour more clear and avoids linting against
alignments <= the pointer alignment on all platforms, as well as alignment for
types which will be re-aligned in the callee by clang.

Finally, it also adds an exception for the `std::function` stdlib type which is
16-byte aligned on macOS, but has a legal alignment on windows x86, and
therefore should not be linted against as it will behave correctly on all
platforms.

In the future, if we update to a version of clang without this ABI bug, we may
want to remove this lint entirely.

Differential Revision: https://phabricator.services.mozilla.com/D132997
2021-12-14 16:49:18 +00:00
Nika Layzell 2e21209147 Bug 1744604 - Part 2: Be less restrictive with the non-memmovable static analysis, r=andi
This change adds an exception for stl types which implement
`std::is_trivially_move_constructible` and `std::is_trivially_destructible`, as
these are generally stable parts of the standard library type definition which
may be relied on by downstream code.

Differential Revision: https://phabricator.services.mozilla.com/D132996
2021-12-14 16:49:17 +00:00
Nika Layzell ab7c298175 Bug 1744604 - Part 1: Make CustomTypeAnnotation more flexible, r=andi
This allows CustomTypeAnnotation to customize the type traversal behaviour to
allow things like opting library types out of static analysis easier. It will
be used in parts 2 and 3 to improve the non-memmoveable and non-param trait
analysis.

Differential Revision: https://phabricator.services.mozilla.com/D132995
2021-12-14 16:49:17 +00:00
Sandor Molnar c0474edcdf Backed out 3 changesets (bug 1744604) for causing build bustages in TestNonParameterChecker. CLOSED TREE
Backed out changeset 31d7633b2826 (bug 1744604)
Backed out changeset 3fc47ff6a295 (bug 1744604)
Backed out changeset 051767551298 (bug 1744604)
2021-12-08 03:51:39 +02:00
Nika Layzell 6781985fe4 Bug 1744604 - Part 3: Relax the alignas lint to be more accurate to the potential alignment issue, r=andi
The platform in question which triggered this lint being added is the windows
x86 ABI, which pre-msvc version 19.14 emitted an error when passing complex
aggregate types as parameters due to not being able to align them.
Unfortunately modern versions of Clang still have a bug in the implementation
of the post-19.14 ABI and will pass types with incorrect alignments.

This change makes the intended behaviour more clear and avoids linting against
alignments <= the pointer alignment on all platforms, as well as alignment for
types which will be re-aligned in the callee by clang.

Finally, it also adds an exception for the `std::function` stdlib type which is
16-byte aligned on macOS, but has a legal alignment on windows x86, and
therefore should not be linted against as it will behave correctly on all
platforms.

In the future, if we update to a version of clang without this ABI bug, we may
want to remove this lint entirely.

Depends on D132996

Differential Revision: https://phabricator.services.mozilla.com/D132997
2021-12-07 20:38:16 +00:00
Nika Layzell 0047d8c90a Bug 1744604 - Part 2: Be less restrictive with the non-memmovable static analysis, r=andi
This change adds an exception for stl types which implement
`std::is_trivially_move_constructible` and `std::is_trivially_destructible`, as
these are generally stable parts of the standard library type definition which
may be relied on by downstream code.

Depends on D132995

Differential Revision: https://phabricator.services.mozilla.com/D132996
2021-12-07 20:38:15 +00:00
Nika Layzell 19478cb9ed Bug 1744604 - Part 1: Make CustomTypeAnnotation more flexible, r=andi
This allows CustomTypeAnnotation to customize the type traversal behaviour to
allow things like opting library types out of static analysis easier. It will
be used in parts 2 and 3 to improve the non-memmoveable and non-param trait
analysis.

Differential Revision: https://phabricator.services.mozilla.com/D132995
2021-12-07 20:38:15 +00:00
kriswright df91a347b4 Bug 1532955 - Track available memory on linux. r=gsvelto,tkikuchi
This introduces a low memory watcher that dispatches an offthread read of /proc/meminfo every 5000/1000ms depending on memory levels, then determines which information to act on. It works like this:
- Get a percentage of `MemAvailable` versus `MemTotal`.
- If memory drops below 5% availability, we are in a memory pressure scenario
- If `MemAvailable` is not large enough to accommodate a content process, we are in a memory pressure scenario
- If we are in a memory pressure scenario, notify the observers from the main thread.

The value I decided to use to represent a content process was based on observation and should be adjusted if it is not representative of what we consider a "typical" content process.

Differential Revision: https://phabricator.services.mozilla.com/D117972
2021-12-02 11:14:30 +00:00
Noemi Erli c25daf6c77 Backed out changeset 4b8b155c97a5 (bug 1532955) for causing build bustage in TestAvailableMemoryWatcherLinux.cpp CLOSED TREE 2021-12-02 12:24:03 +02:00
kriswright 58551a6795 Bug 1532955 - Track available memory on linux. r=gsvelto,tkikuchi
This introduces a low memory watcher that dispatches an offthread read of /proc/meminfo every 5000/1000ms depending on memory levels, then determines which information to act on. It works like this:
- Get a percentage of `MemAvailable` versus `MemTotal`.
- If memory drops below 5% availability, we are in a memory pressure scenario
- If `MemAvailable` is not large enough to accommodate a content process, we are in a memory pressure scenario
- If we are in a memory pressure scenario, notify the observers from the main thread.

The value I decided to use to represent a content process was based on observation and should be adjusted if it is not representative of what we consider a "typical" content process.

Differential Revision: https://phabricator.services.mozilla.com/D117972
2021-12-02 07:16:50 +00:00
Csoregi Natalia 5d43115f90 Backed out changeset 44b7971a0893 (bug 1532955) for bustage on AvailableMemoryWatcher.cpp and other failures. CLOSED TREE 2021-12-01 22:40:47 +02:00
kriswright 6c2438cacc Bug 1532955 - Track available memory on linux. r=gsvelto,tkikuchi
This introduces a low memory watcher that dispatches an offthread read of /proc/meminfo every 5000/1000ms depending on memory levels, then determines which information to act on. It works like this:
- Get a percentage of `MemAvailable` versus `MemTotal`.
- If memory drops below 5% availability, we are in a memory pressure scenario
- If `MemAvailable` is not large enough to accommodate a content process, we are in a memory pressure scenario
- If we are in a memory pressure scenario, notify the observers from the main thread.

The value I decided to use to represent a content process was based on observation and should be adjusted if it is not representative of what we consider a "typical" content process.

Differential Revision: https://phabricator.services.mozilla.com/D117972
2021-12-01 19:12:31 +00:00
Mike Hommey a90ac64587 Bug 1743708 - Fix clang-plugin tests to pass with clang-trunk. r=andi
This upstream change[1] changed the error messages when arrays are
involved, so we adjust the expected-errors/expected-notes to account for
that.

1. aee4925507

Differential Revision: https://phabricator.services.mozilla.com/D132533
2021-12-01 06:28:02 +00:00
Kershaw Chang 1b01ccfacd Bug 1392272 - P1: [windows] Monitor system proxy changes, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D127724
2021-11-08 09:00:26 +00:00
Byron Campen [:bwc] e3737b1c60 Bug 1654112 - Exempt code in webrtc namespace from implicit conversion operator checks. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D105012
2021-02-12 14:26:36 +00:00
Andi-Bogdan Postelnicu ebad6463ab Bug 1731582 - starting with clang-13 some member functions from `StringRef` have been renamed. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D126319
2021-09-28 07:52:17 +00:00
Andi-Bogdan Postelnicu 8e5068999f Bug 1731582 - starting with clang-13 `Expr::isRValue` has been changed to `Expr::isPRValue`. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D126318
2021-09-28 07:52:16 +00:00
Tetsuharu Ohzeki 2eebd6e256 Bug 1732328 - Remove the vestiges of LayerScope. r=gfx-reviewers,jrmuizel
`Layer::GetDisplayListLog()` also still contains the metion to
LayerScope to dump display list.

But this change does not remove it because it's a part of debugging display list.
If we remove it, I think we should open a new bug for it.

Differential Revision: https://phabricator.services.mozilla.com/D126512
2021-09-25 16:22:25 +00:00
Chris Peterson 339c7d8961 Bug 1729598 - Remove now-unused MustUseChecker and MOZ_MUST_USE_TYPE attribute. r=static-analysis-reviewers,andi
Depends on D125504

Differential Revision: https://phabricator.services.mozilla.com/D125505
2021-09-15 05:10:51 +00:00
Andrew Sutherland c872d06387 Bug 1728376 - Searchfox should treat pure virtual declarations as definitions. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D124152
2021-09-01 02:41:05 +00:00