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

855 Коммитов

Автор SHA1 Сообщение Дата
Valentin Gosu 056175d0a1 Bug 1677718 - Completely remove AppCache API implementation r=necko-reviewers,emilio,jesup
Depends on D179337

Differential Revision: https://phabricator.services.mozilla.com/D179420
2023-06-02 07:55:23 +00:00
Cosmin Sabou e678b16e56 Backed out 2 changesets (bug 1677718) for causing appcache wpt failures.
Backed out changeset 2b6b58a6fe2f (bug 1677718)
Backed out changeset d1cfc37a01b3 (bug 1677718)
2023-06-01 02:18:51 +03:00
Valentin Gosu ffa99d7088 Bug 1677718 - Completely remove AppCache API implementation r=necko-reviewers,emilio,jesup
Depends on D179337

Differential Revision: https://phabricator.services.mozilla.com/D179420
2023-05-31 07:45:46 +00:00
nicklas boman 5e31225558 Bug 1724649 - Followup to remove #include plstr.h r=necko-reviewers,xpcom-reviewers,valentin,nika
Differential Revision: https://phabricator.services.mozilla.com/D177690
2023-05-15 14:53:02 +00:00
Valentin Gosu 5c922d8b93 Bug 1818714 - Remove cachePurge lock file after running BackgroundTask_removeDirectory r=necko-reviewers,saschanaz,jesup
Differential Revision: https://phabricator.services.mozilla.com/D176548
2023-05-03 12:40:54 +00:00
Noemi Erli 3288860e0f Backed out changeset 7c343aa2fe80 (bug 1818714) for causing marionette failures CLOSED TREE 2023-04-28 19:54:57 +03:00
Valentin Gosu 418bf22f37 Bug 1818714 - Remove cachePurge lock file after running BackgroundTask_removeDirectory r=necko-reviewers,saschanaz,jesup
Differential Revision: https://phabricator.services.mozilla.com/D176548
2023-04-28 15:30:49 +00:00
Kai Engert 899e773917 Bug 1826661 - Add null checks in CacheOutputCloseListener to gracefully handle being called during XPCOM shutdown. r=necko-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D174931
2023-04-13 10:18:42 +00:00
Valentin Gosu 401d933a4f Bug 1827504 - Remove last files of netwerk/cache/ r=sunil,geckoview-reviewers,zeid,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D175177
2023-04-13 09:04:24 +00:00
Nika Layzell 3b40268cc1 Bug 1818305 - Part 2: Add a streamStatus method to nsIInputStream, r=xpcom-reviewers,necko-reviewers,geckoview-reviewers,valentin,jesup,m_kato,mccr8
This is semantically similar to the existing available() method, however will
not block, and doesn't need to do the work to actually determine the number of
available bytes.

As part of this patch, I also fixed one available() implementation which was
incorrectly throwing NS_BASE_STREAM_WOULD_BLOCK.

Differential Revision: https://phabricator.services.mozilla.com/D170697
2023-03-15 19:52:34 +00:00
Nika Layzell e61507c3a3 Bug 1818305 - Part 1: Add a streamStatus method to nsIOutputStream, r=necko-reviewers,geckoview-reviewers,jesup,emilio,m_kato,devtools-reviewers
This new method can be used to check if the nsIOutputStream has been
closed without having data available to write. It should avoid blocking
to discover this information.

Differential Revision: https://phabricator.services.mozilla.com/D170696
2023-03-15 19:52:33 +00:00
Andi-Bogdan Postelnicu d7e8a09c21 Bug 1519636 - Reformat recent changes to the Google coding style. r=glandium
Updated with clang-format version 15.0.5 (taskcluster-MKK8dHUpQkGfPLA793lizg)
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D168658
2023-02-13 15:02:07 +00:00
Kagami Sascha Rosylight 66762decd8 Bug 1788986 - Part 5: Add Glean metrics for _removeDirectory r=janv,valentin,necko-reviewers,chutten,nalexander,smaug
Differential Revision: https://phabricator.services.mozilla.com/D156941
2023-02-06 11:32:49 +00:00
Iulian Moraru 0caa2f1940 Backed out 3 changesets (bug 1788986) for causing xpcshell failures on test_backgroundtask_removeDirectory.js. CLOSED TREE
Backed out changeset d288a5d5cc3d (bug 1788986)
Backed out changeset 7f30102942bc (bug 1788986)
Backed out changeset 8c8026379e91 (bug 1788986)
2023-02-02 20:58:26 +02:00
Kagami Sascha Rosylight 4df611fead Bug 1788986 - Part 5: Add Glean metrics for _removeDirectory r=janv,valentin,necko-reviewers,chutten,nalexander,smaug
Differential Revision: https://phabricator.services.mozilla.com/D156941
2023-02-02 15:23:47 +00:00
Nika Layzell 9d6bb19c23 Bug 1809753 - Part 4: Remove unnecessary GetMainThreadEventTarget, r=mccr8
This method always returned GetMainThreadSerialEventTarget(). This patch
switches all callers over to use that method instead.

We can't easily switch all calls to be calls to NS_GetMainThread(), as there is
no version of that method returning a bare nsIThread* instance.

I didn't introduce one, as we may want to add a lock around mMainThread in the
future, which would require removing nsThreadManager::GetMainThreadWeak. As
this method only returns nsISerialEventTarget, it method could remain
implemented, however, by returning a statically allocated fake event target
which forwards dispatches (and QIs to nsIThread) to the real main thread.

Differential Revision: https://phabricator.services.mozilla.com/D166608
2023-01-16 23:14:12 +00:00
Nika Layzell 852d02ec16 Bug 1809753 - Part 3: Replace all callers of GetCurrentEventTarget with GetCurrentSerialEventTarget, r=mccr8,necko-reviewers,valentin
This only changes the behaviour when called with a TaskQueue or other type
using SerialEventTargetGuard on the stack. They are being switched over as the
existing GetCurrentEventTarget method is being removed, as it is somewhat
confusing, and poorly documented.

Callers which need to get the current thread even when on a threadpool or
behind a TaskQueue were switched to GetCurrentEventTarget in the previous part.

Differential Revision: https://phabricator.services.mozilla.com/D166607
2023-01-16 23:14:11 +00:00
Sandor Molnar 41b78439d0 Backed out 6 changesets (bug 1809752, bug 1809753) for causing perma failures in browser/components/firefoxview/tests/browser/browser_feature_callout_position.js
Backed out changeset ea05784d74c4 (bug 1809753)
Backed out changeset 7c9b20eebcc8 (bug 1809753)
Backed out changeset d0267ac2256d (bug 1809753)
Backed out changeset aa9f2971bd6f (bug 1809753)
Backed out changeset f0d9fcfaa6f8 (bug 1809752)
Backed out changeset 6d58c799cffe (bug 1809752)
2023-01-17 03:19:24 +02:00
Nika Layzell f7772bb6ae Bug 1809753 - Part 4: Remove unnecessary GetMainThreadEventTarget, r=mccr8
This method always returned GetMainThreadSerialEventTarget(). This patch
switches all callers over to use that method instead.

We can't easily switch all calls to be calls to NS_GetMainThread(), as there is
no version of that method returning a bare nsIThread* instance.

I didn't introduce one, as we may want to add a lock around mMainThread in the
future, which would require removing nsThreadManager::GetMainThreadWeak. As
this method only returns nsISerialEventTarget, it method could remain
implemented, however, by returning a statically allocated fake event target
which forwards dispatches (and QIs to nsIThread) to the real main thread.

Differential Revision: https://phabricator.services.mozilla.com/D166608
2023-01-16 23:14:12 +00:00
Nika Layzell 8d118308de Bug 1809753 - Part 3: Replace all callers of GetCurrentEventTarget with GetCurrentSerialEventTarget, r=mccr8,necko-reviewers,valentin
This only changes the behaviour when called with a TaskQueue or other type
using SerialEventTargetGuard on the stack. They are being switched over as the
existing GetCurrentEventTarget method is being removed, as it is somewhat
confusing, and poorly documented.

Callers which need to get the current thread even when on a threadpool or
behind a TaskQueue were switched to GetCurrentEventTarget in the previous part.

Differential Revision: https://phabricator.services.mozilla.com/D166607
2023-01-16 23:14:11 +00:00
Valentin Gosu e6676a245b Bug 1805535 - Add null check to avoid crash in CacheFileIOManager::SyncRemoveDir r=necko-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D166571
2023-01-12 08:05:44 +00:00
Valentin Gosu df399d18cd Bug 1806831 - removeDirectory background tasks keep spawning if the policy is set to clear the cache on shutdown r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D165854
2023-01-04 07:29:36 +00:00
Noemi Erli 9855e2b77b Backed out changeset 837b1f1e4939 (bug 1806831) for causing background related failures CLOSED TREE 2023-01-03 15:17:35 +02:00
Valentin Gosu 265b52fb1f Bug 1806831 - removeDirectory background tasks keep spawning if the policy is set to clear the cache on shutdown r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D165854
2023-01-03 11:45:23 +00:00
Nika Layzell 0ff3b55986 Bug 1806332 - Dispatch CacheOutputCloseListener to main thread when already there, r=kershaw,necko-reviewers
This should avoid the crash caused by the CacheOutputCloseListener being
fired on the main thread too late during shutdown by keeping the
previous behaviour when on the main thread.

Differential Revision: https://phabricator.services.mozilla.com/D165062
2022-12-20 20:18:46 +00:00
Nika Layzell 6abdeea3e4 Bug 1799222 - Part 2: Dispatch background task for CacheOutputCloseListener::OnOutputClosed, r=necko-reviewers,kershaw
Previously this would dispatch to the current thread, which could in
some cases be a threadpool thread, meaning that the runnable would
not run until the threadpool thread exits. This switches the code over
to always dispatch to the StreamTransportService instead.

Depends on D161349

Differential Revision: https://phabricator.services.mozilla.com/D164504
2022-12-16 17:09:17 +00:00
edgul 57acf63da4 Bug 1745972 - Added assertions to verify additions and removals of mRecs. r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D161215
2022-12-12 21:32:12 +00:00
Valentin Gosu 8f4daa25f7 Bug 1787927 - Don't dispatch http purge background task if sanitizeOnShutdown pref not set r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D163080
2022-11-28 12:55:14 +00:00
Kagami Sascha Rosylight 4cb6d25f2d Bug 1788986 - Part 1: Convert BackgroundTasksRunner as an XPCOM component r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D160674
2022-11-25 19:50:29 +00:00
Mathew Hodson 92d3050ecb Bug 1801020 - Fix build failure with --disable-backgroundtasks. r=valentin,necko-reviewers,nalexander,saschanaz
Differential Revision: https://phabricator.services.mozilla.com/D162257
2022-11-18 13:05:56 +00:00
Dana Keeler 1a2ff46b6e Bug 1791633 - separate nsITLSSocketControl from nsITransportSecurityInfo r=necko-reviewers,kershaw,jschanck
Depends on D160311

Differential Revision: https://phabricator.services.mozilla.com/D160313
2022-11-16 16:37:29 +00:00
Valentin Gosu ef7edc4d4d Bug 1786256 - Let network.cache.shutdown_purge_in_background_task=true ride the trains r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D162190
2022-11-16 12:36:16 +00:00
Marian-Vasile Laza 9c44d165bb Backed out 3 changesets (bug 1791633) for causing bustages on TransportSecurityInfo.cpp. CLOSED TREE
Backed out changeset 23b864e14db0 (bug 1791633)
Backed out changeset 0bcba3375ec0 (bug 1791633)
Backed out changeset ab0ea0d68f5c (bug 1791633)
2022-11-15 23:51:58 +02:00
Dana Keeler 0a13b94a8f Bug 1791633 - separate nsITLSSocketControl from nsITransportSecurityInfo r=necko-reviewers,kershaw,jschanck
Depends on D160311

Differential Revision: https://phabricator.services.mozilla.com/D160313
2022-11-15 20:03:29 +00:00
Butkovits Atila f3f66bf7e5 Backed out 3 changesets (bug 1791633) for causing build bustages at nsHttpConnectionMgr.cpp:. CLOSED TREE
Backed out changeset ee9744982673 (bug 1791633)
Backed out changeset f5a4bfdaba40 (bug 1791633)
Backed out changeset f57131b9cfe2 (bug 1791633)
2022-11-15 08:07:16 +02:00
Dana Keeler a7fbd7a3a0 Bug 1791633 - separate nsITLSSocketControl from nsITransportSecurityInfo r=necko-reviewers,kershaw,jschanck
Depends on D160311

Differential Revision: https://phabricator.services.mozilla.com/D160313
2022-11-15 05:34:40 +00:00
Randell Jesup 4c109a25fb Bug 1207753 - netwerk/cache2 thread-safety annotations r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D160392
2022-11-12 00:00:49 +00:00
Cristian Tuns ee55bd7851 Backed out changeset 6a036b7abe73 (bug 1207753) for causing build bustages CacheFile.h CLOSED TREE 2022-11-11 15:26:46 -05:00
Randell Jesup 4c09f799cd Bug 1207753 - netwerk/cache2 thread-safety annotations r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D160392
2022-11-11 20:07:26 +00:00
Kagami Sascha Rosylight d20dd96f8f Bug 1791675 - Part 4: Make sure purgeHTTPCache runs after shutdown r=webdriver-reviewers,necko-reviewers,valentin,nalexander,whimboo
This adds BackgroundTasksRunner utility class as a generic way to properly run background tasks. A few argument for not extending existing BackgroundTasksUtils:

1. Simply because the existing use case is in C++.
2. I have another use case from JSM and thus I'll ultimately convert this an XPCOM component. And `CacheFileIOManager::DispatchPurgeTask` cannot get a JSM-written XPCOM instance which is required to be main-thread only.

Depends on D157998

Differential Revision: https://phabricator.services.mozilla.com/D157757
2022-11-08 15:42:24 +00:00
Valentin Gosu 292ecbe28d Bug 1794376 - Rename BlockingIOWatcher and simplify code r=edgul
We don't need mEvent to wait for IO completion. Instead, we just cancel
it immediately.

Differential Revision: https://phabricator.services.mozilla.com/D159846
2022-10-28 12:36:48 +00:00
Valentin Gosu a5d6d45941 Bug 1794376 - Use SpinEventLoopUntil to await for CacheFileIOManager shutdown r=jstutte,edgul
Differential Revision: https://phabricator.services.mozilla.com/D159845
2022-10-28 12:36:47 +00:00
Kagami Sascha Rosylight 62af8960d0 Bug 1796085 - Part 2: Rename _purgeHTTPCache as _removeDirectory r=valentin,necko-reviewers
This background task currently is generic enough that it can be reused for other components, namely QuotaCleaner in the child patches. Renaming makes it clear that it's generic.

Differential Revision: https://phabricator.services.mozilla.com/D156912
2022-10-19 12:04:09 +00:00
Kagami Sascha Rosylight fac20df060 Bug 1796085 - Part 1: Define MOZ_BACKGROUNDTASKS macro globally r=smaug,necko-reviewers,application-update-reviewers,nalexander,valentin
There are 10+ separate macro definition for this, we can do it globally instead.

Differential Revision: https://phabricator.services.mozilla.com/D156911
2022-10-19 12:04:08 +00:00
Dana Keeler 9c1b9475f3 Bug 1793841 - deserialize nsITransportSecurityInfo without already having an instance of it r=jschanck,necko-reviewers,dragana
This is an important step in making nsITransportSecurityInfo constant.

Depends on D157994

Differential Revision: https://phabricator.services.mozilla.com/D157995
2022-10-18 21:25:03 +00:00
Mark Banner 2ffde1e92f Bug 1792341 - Migrate more toolkit/modules consumers to use direct ES module import. r=Gijs,webdriver-reviewers,perftest-reviewers,necko-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,sgalich,owlish,bytesized,AlexandruIonescu,whimboo,mconley,mixedpuppy
Mainly automated changes. Some manual ESLint fixes and whitespace cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D158452
2022-10-18 11:21:26 +00:00
Noemi Erli 5a21645f73 Backed out 2 changesets (bug 1793841) for causing Gtest failures CLOSED TREE
Backed out changeset 4d39c423b92e (bug 1793841)
Backed out changeset 5cfb5f595add (bug 1793841)
2022-10-18 04:29:44 +03:00
Dana Keeler 0d78f1f283 Bug 1793841 - deserialize nsITransportSecurityInfo without already having an instance of it r=jschanck,necko-reviewers,dragana
This is an important step in making nsITransportSecurityInfo constant.

Depends on D157994

Differential Revision: https://phabricator.services.mozilla.com/D157995
2022-10-18 00:18:09 +00:00
Kagami Sascha Rosylight 232d5682ef Bug 1784840 - Convert all background tasks to ESM r=nalexander,application-update-reviewers,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D156950
2022-10-15 18:24:37 +00:00
Mark Banner dcf3abed55 Bug 1788038 - Turn on ESLint rule for prefer-boolean-length-check for netwerk. r=necko-reviewers,dragana
Depends on D155965

Differential Revision: https://phabricator.services.mozilla.com/D155966
2022-09-05 22:01:07 +00:00