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

703 Коммитов

Автор SHA1 Сообщение Дата
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
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. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. 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
2020-10-26 18:34:53 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
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. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. 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
2020-10-23 20:40:42 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
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
2020-10-21 21:27:27 +00:00
Bas Schouten 25a1b0f61f Bug 1669256 - Part 1: Remove AbstractEventQueue and de-templatize ThreadEventQueue. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D92709
2020-10-09 17:56:34 +00:00
Simon Giesecke de7bab0f06 Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82325
2020-09-23 15:17:15 +00:00
Valentin Gosu a8fed672cb Bug 1664020 - ShutdownEvent::PostAndWait should return immediately if posting the event fails r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D89648
2020-09-14 09:27:42 +00:00
Bogdan Tara c2f16d6986 Backed out changeset 73bd8f2fbbf1 (bug 1664020) for bustages complaining about CacheFileIOManager.cpp CLOSED TREE 2020-09-11 16:10:19 +03:00
Valentin Gosu 260b3b5abf Bug 1664020 - ShutdownEvent::PostAndWait should return immediately if posting the event fails r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D89648
2020-09-11 07:59:42 +00:00
Michal Novotny f67509ab41 Bug 1662012 - Remove filesystem reporting from the cache, r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D88740
2020-08-31 15:16:07 +00:00
Michal Novotny fe4555c51f Bug 1662011 - Remove hash stats code from the cache, r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D88739
2020-08-31 06:53:06 +00:00
Michal Novotny a58fc4abae Bug 1645052 - Do not store number of bytes written to the cache in preferences, r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D88488
2020-08-28 09:22:45 +00:00
Simon Giesecke cfd7d0ea9c Bug 1659923 - Avoid unnecessary copies around Base64Encode. r=xpcom-reviewers,necko-reviewers,froydnj,valentin
This also adds some more variants of Base64Encode and Base64EncodeAppend.

Differential Revision: https://phabricator.services.mozilla.com/D87559
2020-08-19 17:45:16 +00:00
Simon Giesecke 96f3e7e019 Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-04 11:27:07 +00:00
Noemi Erli 381fca9783 Backed out 4 changesets (bug 1654992, bug 1654991) for causing timeous in mask-opacity-1e.html
Backed out changeset 11f0f54c6e0a (bug 1654992)
Backed out changeset a353dd5b3f08 (bug 1654991)
Backed out changeset 6a7964ba549f (bug 1654991)
Backed out changeset cf3bfb91d98c (bug 1654991)
2020-08-03 22:09:36 +03:00
Simon Giesecke 032d2ac9d3 Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-03 14:54:18 +00:00
Honza Bambas 66d2269fb8 Bug 1652300 - Keep lock around mState in `CacheEntry::InvokeAvailableCallback`, r=michal,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D84495
2020-07-23 11:46:10 +00:00
Michal Novotny 0e25e01126 Bug 1645051 - Calculated smart max cache size shouldn't overwrite browser.cache.disk.capacity pref r=necko-reviewers,mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D83377
2020-07-14 16:54:22 +00:00
Honza Bambas 2b6e822019 Bug 1650613 - Fix about:cache appcache listing, let AppCacheStorage be visited with null load context info, r=michal,necko-reviewers
Depends on D81885

Differential Revision: https://phabricator.services.mozilla.com/D82542
2020-07-10 11:21:14 +00:00
Honza Bambas a14447a33a Bug 1642602 - Make about:cache show all entries, remove the no longer usable context switch UI, r=michal,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D81885
2020-07-03 11:41:53 +00:00
Honza Bambas 3e4d7a2df9 Bug 1615121 - Keep CacheEntry.mLock when reading its mState to prevent a race, r=michal,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D62773
2020-07-01 17:55:46 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Jean-Yves Avenard 87438519f0 Bug 1637500 - P2. Rename methods as they are not always dealing with "threads". r=froydnj
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
2020-06-23 05:05:36 +00:00
Honza Bambas 0aefd3e956 Bug 1487101 - Do not interrupt purging of HTTP cache entries from memory by frecency until the pool containts at most 2000 entries, r=michal,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D80180
2020-06-19 05:43:42 +00:00
Simon Giesecke 82dc9b2271 Bug 1642949 - Replace uses of RemoveElementAt by RemoveLastElement/PopLastElement where possible. r=necko-reviewers,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78027
2020-06-10 10:46:14 +00:00
Butkovits Atila e3dce68834 Backed out 3 changesets (bug 1643289, bug 1642949) for causing failure at test_headless_screenshot.html. CLOSED TREE
Backed out changeset 98c420f73380 (bug 1643289)
Backed out changeset 9447ea8910aa (bug 1643289)
Backed out changeset 0c827da9d847 (bug 1642949)
2020-06-10 10:07:23 +03:00
Simon Giesecke d419f0ff08 Bug 1642949 - Replace uses of RemoveElementAt by RemoveLastElement/PopLastElement where possible. r=necko-reviewers,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78027
2020-06-10 05:49:28 +00:00
Honza Bambas 281f7b311b Bug 1634950 - Add event dispatch-and-run MOZ_LOG to our xpcom threads, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D73622
2020-05-12 12:48:49 +00:00
Gerald Squelart 6f36a3fdb8 Bug 1609907 - Remove AUTO_PROFILER_THREAD_SLEEP before mozilla::CondVar waits - r=mstange
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
2020-05-01 22:12:22 +00:00
Simon Giesecke 191a830575 Bug 1628715 - Part 7: Add MOZ_NONNULL_RETURN to infallible nsTArray::AppendElements. r=xpcom-reviewers,necko-reviewers,nika,valentin
Differential Revision: https://phabricator.services.mozilla.com/D70831
2020-04-24 13:31:14 +00:00
Michal Novotny 9fdf075d81 Bug 1624515 - Fix data race on CacheStorageService::mShutdown r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D71768
2020-04-21 20:33:37 +00:00
Chris Peterson 9db7016a65 Bug 1630511 - Replace MOZ_MUST_USE with [[nodiscard]] in netwerk. r=necko-reviewers,dragana
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
2020-04-18 06:37:32 +00:00
MahakBansal 4452860213 Bug 1614659 - CacheIndex::Shutdown() should not check if files exist before removing them.r=michal
Differential Revision: https://phabricator.services.mozilla.com/D70094

--HG--
extra : moz-landing-system : lando
2020-04-10 08:14:19 +00:00
Honza Bambas 4f360112b6 Bug 1626809 - Sanitize HTTP disk cache storage context key to prevent leak of private data like URLs, r=njn
Differential Revision: https://phabricator.services.mozilla.com/D69625

--HG--
extra : moz-landing-system : lando
2020-04-09 12:38:09 +00:00
Andreas Farre 63e21eec70 Bug 1620594 - Part 1: Rework NS_ReleaseOnMainThreadSystemGroup. r=nika
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
2020-04-07 15:16:23 +00:00
anjali1903 4018161e48 Bug 1621251 Replace NS_ADDREF(*var = other) with *var = do_AddRef(other).take() in /netwerk r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D66818

--HG--
extra : moz-landing-system : lando
2020-03-17 15:05:26 +00:00
Michal Novotny 3ab8b4b548 Bug 1614619 - Eviction algorithm should first evict entries of a content type that’s above a limit r=valentin
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
2020-03-02 12:17:32 +00:00
Michal Novotny f913f3c0b6 Bug 1614610 - Fix missing initialization of CacheIndexStats::mCountByType[] and CacheIndexStats::mSizeByType[] r=valentin
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
2020-02-26 17:16:39 +00:00
Michal Novotny 17f7cb5283 Bug 1616507 - Intermittent PID 13265 | SUMMARY: ThreadSanitizer: data race /builds/worker/workspace/build/src/netwerk/cache2/CacheFile.cpp:2362:48 in EntryWouldExceedLimit r=mayhemer
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
2020-02-26 11:56:21 +00:00
Simon Giesecke aaf6cb4e75 Bug 1617628 - Hide nsBaseHashtable Put overloads in nsRefPtrHashtable subclass. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D63899

--HG--
extra : moz-landing-system : lando
2020-02-25 17:03:36 +00:00
Michal Novotny 47f2a10a01 Bug 1614610 - Have cache occupancy for each content-type in cache index r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D63624

--HG--
extra : moz-landing-system : lando
2020-02-24 09:09:54 +00:00
Simon Giesecke 9350e6b741 Bug 1613985 - Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj
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
2020-02-20 11:40:14 +00:00
Dorel Luca d5f9df8ee1 Backed out 2 changesets (bug 1613985) for Build bustage on Windows2012. CLOSED TREE
Backed out changeset fd177b40b561 (bug 1613985)
Backed out changeset fb6d62b7f28d (bug 1613985)
2020-02-19 22:22:41 +02:00
Simon Giesecke 59b23375c0 Bug 1613985 - Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj
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
2020-02-19 18:05:38 +00:00
Michal Novotny 5cd74804aa Bug 1614637 - ThreadSanitizer: data race [@ assign_assuming_AddRef] vs. [@ operator bool] in CacheStorageService r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D62550

--HG--
extra : moz-landing-system : lando
2020-02-17 18:44:21 +00:00
Simon Giesecke b50347f917 Bug 1611415 - Prefer using std::move over forget. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-13 14:38:48 +00:00
Michal Novotny 32b5d4c391 Bug 1614706 - ThreadSanitizer: data race [@ Release] vs. [@ CloseWithStatusLocked] in CacheFileInputStream r=mayhemer
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
2020-02-12 14:45:36 +00:00
shindli 91aa0518dd Backed out changeset 0c982bc69cb3 (bug 1611415) for causing build bustages in /builds/worker/workspace/build/src/obj-firefox/dist/include/nsCOMPtr CLOSED TREE 2020-02-12 20:13:29 +02:00
Simon Giesecke f604a47fa5 Bug 1611415 - Applied FixItHints from mozilla-non-std-move. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-12 17:24:41 +00:00