Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
Before P1, GetCurrentThreadSerialEventTarget would have always returned the same data as NS_GetCurrentThread, making the comment incorrect Now it will properly return the running TaskQueue if any.
This change of name more clearly exposes what they are doing, as we aren't always dealing with threads directly; but a nsISerialEventTarget
Differential Revision: https://phabricator.services.mozilla.com/D80354
CondVar already calls `AUTO_PROFILER_THREAD_SLEEP`, which shouldn't be called recursively.
mozilla::Monitor also uses CondVar, so it shouldn't be surrounded by `AUTO_PROFILER_THREAD_SLEEP` either.
Depends on D72850
Differential Revision: https://phabricator.services.mozilla.com/D72851
Also move MOZ_MUST_USE before function declarations' specifiers and return type. While clang and gcc's __attribute__((warn_unused_result)) can appear before, between, or after function specifiers and return types, the [[nodiscard]] attribute must precede the function specifiers.
Differential Revision: https://phabricator.services.mozilla.com/D71144
To be able to remove SystemGroup, NS_ReleaseOnMainThreadSystemGroup
needs to have its dependency on SystemGroup removed. Since all
releases using SystemGroup would've released on the main thread anyway
we can safely replace NS_ReleaseOnMainThreadSystemGroup with
NS_ReleaseOnMainThread.
Depends on D64390
Differential Revision: https://phabricator.services.mozilla.com/D67631
--HG--
extra : moz-landing-system : lando
This patch implements limit for media content type in the cache. When we need to evict something from the cache and media is over the limit, it's evicted first.
Differential Revision: https://phabricator.services.mozilla.com/D64548
--HG--
extra : moz-landing-system : lando
Initialization was missing in CacheIndexStats::CacheIndexStats() and CacheIndexStats::Clear(). Comparison was also added to CacheIndexStats::operator==().
Differential Revision: https://phabricator.services.mozilla.com/D64406
--HG--
extra : moz-landing-system : lando
There is a possible race condition between CacheFile::OnFileOpened() called on the cache I/O thread as a result of calling CacheFileIOManager::OpenFile() and CacheFile::EntryWouldExceedLimit() and CacheFile::SetMemoryOnly(), both called on main thread from CacheEntry::OpenOutputStream(). Both methods now grab the CacheFile's lock to synchronize the access.
Differential Revision: https://phabricator.services.mozilla.com/D63826
--HG--
extra : moz-landing-system : lando
This removes the need for explicit #ifdef NS_BUILD_REFCNT_LOGGING without
introducing user-defined destructors when it is not defined.
Also, some uses of virtual for declaring destructors are replaced by the
appropriate override declaration through these changes.
Differential Revision: https://phabricator.services.mozilla.com/D62604
--HG--
extra : moz-landing-system : lando
This removes the need for explicit #ifdef NS_BUILD_REFCNT_LOGGING without
introducing user-defined destructors when it is not defined.
Also, some uses of virtual for declaring destructors are replaced by the
appropriate override declaration through these changes.
Differential Revision: https://phabricator.services.mozilla.com/D62604
--HG--
extra : moz-landing-system : lando
Acquiring the lock is moved from CacheFile::RemoveInput() to CacheFileInputStream::Release(). This fixes the data race and is consistent with CacheFile::RemoveOutput() which is also called under the lock.
Differential Revision: https://phabricator.services.mozilla.com/D62504
--HG--
extra : moz-landing-system : lando