Commit Graph

1174 Commits

Author SHA1 Message Date
hsingh
35827bd1f0 Bug 1824674: Fixing the wrong assertion in DeleteAllCacheEntries.r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D178555
2023-05-23 15:08:11 +00:00
Mark Banner
8219a5c503 Bug 1826062 - Automatic fixes for Prettier 2.0.5 upgrade. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,owlish
Differential Revision: https://phabricator.services.mozilla.com/D177025
2023-05-20 12:26:49 +00:00
Marco Bonardo
4de92044b6 Bug 1820478 - Set a default Sqlite journal size limit, and persist auxiliary files. r=asuth
Set a default journal_size_limit, so journals are always truncated to a sensible
max size. Change existing consumers to just use the default, but Places that is
using a larger 4MiB limit.
Change auxiliary files (-shm, -journal, -wal, ...) persistance on disk, to
avoid the cost of creating and removing them. Since there is a journal_size_limit
they will be truncated instead of deleted.

Differential Revision: https://phabricator.services.mozilla.com/D172185
2023-05-12 09:45:02 +00:00
Kagami Sascha Rosylight
3803445d91 Bug 1832333 - Remove unused ErrorResult in GetBodyUsed r=smaug
It was added by bug 1385890 (D8450) to properly interact with JS ReadableStream and is not needed anymore.

Differential Revision: https://phabricator.services.mozilla.com/D177635
2023-05-10 20:11:13 +00:00
Jan Varga
1c695f710e Bug 1781201 - Change GetInfoFromValidatedPrincipalInfo to be fallible; r=hsingh
The generation of unique anonynmous origins can fail, so the method needs to be
fallible as well, otherwise the failures couldn't be propagated.

Differential Revision: https://phabricator.services.mozilla.com/D176874
2023-05-03 08:22:56 +00:00
Jan Varga
989747c705 Bug 1781201 - Convert GetInfoFromValidatedPrincipalInfo to a non-static method; r=hsingh
The method will need to access members of the QuotaManager class, so it can't
be static anymore.

Differential Revision: https://phabricator.services.mozilla.com/D176872
2023-05-03 08:22:55 +00:00
Jan Varga
0d54e75ac3 Bug 1781201 - Stop using GetInfoFromPrincipal in the parent; r=hsingh
Quota clients should use GetInfoFromValidatedPrinciplaInfo in the parent
because that method will eventually generate unique anonymous origins for
private browsing.
This patch also moves some calls from the main thread to the PBackground thread
because GetInfoFromValidatedPrinciplaInfo can run on any thread.

Differential Revision: https://phabricator.services.mozilla.com/D176871
2023-05-03 02:05:11 +00:00
Jan Varga
126187ddda Bug 1781201 - Convert GetOriginDirectory/DeleteOriginDirectory arguments into a single argument; r=hsingh
OriginMetadata is a generic type containing relevant information which can be
used for generating unique anonymous origins instead of using original origins
(for example for private browsing).

The patch is partially based on D176751.

Differential Revision: https://phabricator.services.mozilla.com/D176868
2023-05-03 02:05:11 +00:00
Jan Varga
d283c67863 Bug 1781201 - Rename GetDirectoryForOrigin/DeleteFilesForOrigin to GetOriginDirectory/DeleteOriginDirectory; r=hsingh
This is a preparation for converting the arguments to a singe argument using
more generic OriginMetadata type.

The patch is partially based on D176751.

Differential Revision: https://phabricator.services.mozilla.com/D176867
2023-05-03 02:05:10 +00:00
Jan Varga
11083fd9ea Bug 1827377 - Add support for clearing storages in private repository; r=hsingh
Differential Revision: https://phabricator.services.mozilla.com/D175122
2023-04-26 08:23:13 +00:00
sunil mayya
a35b81e828 Bug 1816918 - pass ClientInfo via IPC while creating webtransport session. r=necko-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D173115
2023-03-31 03:54:20 +00:00
Sandor Molnar
5f41905362 Backed out changeset 9fda7af76207 (bug 1816918) for causing build bustage in dom/webtransport/parent/WebTransportParent.cpp CLOSED TREE 2023-03-30 08:36:21 +03:00
sunil mayya
3c35233ee6 Bug 1816918 - pass ClientInfo via IPC while creating webtransport session. r=necko-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D173115
2023-03-30 04:46:54 +00:00
Norisz Fay
0dd2f35ce7 Backed out changeset 2ce4fba56cf7 (bug 1816918) for causing bustage on WebTransportParent.cpp 2023-03-28 21:48:35 +03:00
sunil mayya
0ece05ba82 Bug 1816918 - pass ClientInfo via IPC while creating webtransport session. r=necko-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D173115
2023-03-28 16:53:23 +00:00
Sandor Molnar
f2ead1f335 Backed out changeset db2b968157d6 (bug 1816918) for causing xpc assertion failures in mozilla/Maybe.h CLOSED TREE 2023-03-28 05:30:53 +03:00
sunil mayya
4f907068d8 Bug 1816918 - pass ClientInfo via IPC while creating webtransport session. r=necko-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D173115
2023-03-28 01:39:23 +00:00
Iulian Moraru
fa6cfbe289 Backed out changeset 57f13fcb6953 (bug 1816918) for causing build bustages on WebTransportParent.cpp. CLOSED TREE 2023-03-27 18:03:33 +03:00
sunil mayya
3497e2d7c9 Bug 1816918 - pass ClientInfo via IPC while creating webtransport session. r=necko-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D173115
2023-03-27 12:35:44 +00:00
Marco Bonardo
f3e842d937 Bug 1813986 - Add an asyncVacuum() method to storage async connections, and let VacuumManager use it. r=asuth
Add asyncVacuum to mozIStorageAsyncConnection, that dispatches a runnable to
the helper thread, where it will execute a full or incremental vacuum, depending
on the connection auto_vacuum value.
It also supports vacuuming attached schemas.
asyncVacuum() supports changing both the page_size and auto_vacuum.
Change mozIStorageVacuumParticipant to return a mozIStorageAsyncConnection and
allow specifying whether incremental vacuum should be enabled.
Change vacuumManager notification from heavy-io-task to vacuum-begin and vacuum-end
since the original proposal of notifying heavy IO didn't take off.
Cleanup test_vacuum to be able to use instances of the test VacuumParticipant,
that means we can remove the no more necessary registerESM hack.
Fix Places History as the only cpp consumer.

Differential Revision: https://phabricator.services.mozilla.com/D168298
2023-03-22 15:36:37 +00:00
Noemi Erli
eac4250835 Backed out 2 changesets (bug 1813986) for causing build bustages in Logging.h
Backed out changeset 14879c9b6b3c (bug 1813986)
Backed out changeset d90fa56c73e5 (bug 1813986)
2023-03-22 01:19:57 +02:00
Marco Bonardo
daa6ee1e11 Bug 1813986 - Add an asyncVacuum() method to storage async connections, and let VacuumManager use it. r=asuth
Add asyncVacuum to mozIStorageAsyncConnection, that dispatches a runnable to
the helper thread, where it will execute a full or incremental vacuum, depending
on the connection auto_vacuum value.
It also supports vacuuming attached schemas.
asyncVacuum() supports changing both the page_size and auto_vacuum.
Change mozIStorageVacuumParticipant to return a mozIStorageAsyncConnection and
allow specifying whether incremental vacuum should be enabled.
Change vacuumManager notification from heavy-io-task to vacuum-begin and vacuum-end
since the original proposal of notifying heavy IO didn't take off.
Cleanup test_vacuum to be able to use instances of the test VacuumParticipant,
that means we can remove the no more necessary registerESM hack.
Fix Places History as the only cpp consumer.

Differential Revision: https://phabricator.services.mozilla.com/D168298
2023-03-21 17:28:04 +00:00
Kershaw Chang
5e58575e28 Bug 1809843 - Skip Failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,valentin,sgalich,robwu
Differential Revision: https://phabricator.services.mozilla.com/D171842
2023-03-21 09:09:58 +00:00
Nika Layzell
c4bc184bac Bug 1814686 - Part 1b: Add nullable annotations to refcounted types in ipdl, r=ipc-reviewers,mccr8
Manual changes to make all refcounted types be marked as `nullable` after the
changes in part 1a. This was done without any investigation into whether the
actual types want to be nullable, in order to avoid code changes.

Differential Revision: https://phabricator.services.mozilla.com/D168889
2023-03-20 15:40:37 +00:00
Nika Layzell
78fa962afb Bug 1814683 - Part 1: Combine parent/child fields in IPDL structs/unions, r=ipc-reviewers,necko-reviewers,mccr8
This combines the multiple fields or variants which were previously used to
track sided types like protocol types into a single field wrapped with a
SideVariant.

This will be used in the next part to avoid the need for default constructors
for actor types allowing the proper types to be used.

Differential Revision: https://phabricator.services.mozilla.com/D168879
2023-03-20 15:40:31 +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
Iulian Moraru
801dae8f2c Backed out 14 changesets (bug 1607634, bug 1814683, bug 1815177, bug 1814686) for causing build bustages on MaybeStorageBase. CLOSED TREE
Backed out changeset ae1c0551cea5 (bug 1815177)
Backed out changeset a11cafaa1884 (bug 1814686)
Backed out changeset 621507521762 (bug 1814686)
Backed out changeset ad692c73e381 (bug 1814686)
Backed out changeset 3be031e503dc (bug 1607634)
Backed out changeset aebbaa145d2d (bug 1607634)
Backed out changeset 9aa1f346fe14 (bug 1607634)
Backed out changeset e3eb77ad55ca (bug 1607634)
Backed out changeset e60591e5d5cf (bug 1607634)
Backed out changeset 6e43042d204a (bug 1814683)
Backed out changeset 1706e88652d6 (bug 1814683)
Backed out changeset 6878a1590e91 (bug 1814683)
Backed out changeset b1c980c834d8 (bug 1814683)
Backed out changeset 94480b82d102 (bug 1814683)
2023-03-15 01:58:36 +02:00
Nika Layzell
a07f4ca7c9 Bug 1814686 - Part 1b: Add nullable annotations to refcounted types in ipdl, r=ipc-reviewers,mccr8
Manual changes to make all refcounted types be marked as `nullable` after the
changes in part 1a. This was done without any investigation into whether the
actual types want to be nullable, in order to avoid code changes.

Differential Revision: https://phabricator.services.mozilla.com/D168889
2023-03-14 19:31:41 +00:00
Nika Layzell
97577629c0 Bug 1814683 - Part 1: Combine parent/child fields in IPDL structs/unions, r=ipc-reviewers,necko-reviewers,mccr8
This combines the multiple fields or variants which were previously used to
track sided types like protocol types into a single field wrapped with a
SideVariant.

This will be used in the next part to avoid the need for default constructors
for actor types allowing the proper types to be used.

Differential Revision: https://phabricator.services.mozilla.com/D168879
2023-03-14 19:31:36 +00:00
Marian-Vasile Laza
ee72efd1e9 Backed out 5 changesets (bug 1809843) for causing Cargo related build bustages. CLOSED TREE
Backed out changeset 5c494680f448 (bug 1809843)
Backed out changeset 02742b38edab (bug 1809843)
Backed out changeset 2b9b32ca8294 (bug 1809843)
Backed out changeset 56631cb02ae6 (bug 1809843)
Backed out changeset 37e35a60a71f (bug 1809843)
2023-03-13 13:53:26 +02:00
Kershaw Chang
a60df34ad0 Bug 1809843 - Skip Failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,valentin,sgalich,robwu
Differential Revision: https://phabricator.services.mozilla.com/D171842
2023-03-13 11:12:33 +00:00
Jan Varga
4e8833f029 Bug 1819535 - Extract quota related stuff from TelemetryVFS into standalone QuotaVFS; r=dom-storage-reviewers,mak,asuth
Differential Revision: https://phabricator.services.mozilla.com/D171440
2023-03-07 14:27:07 +00:00
Paul Zuehlcke
6cbd1f2b83 Bug 1814733 r=timhuang,dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D168976
2023-02-27 12:10:39 +00:00
Emilio Cobos Álvarez
af31750cc0 Bug 1775062 - Fix various using statements to use properly qualified names. r=nika,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D167710
2023-01-25 10:52:10 +00:00
Yulia Startsev
1c5ad3e91d Bug 1247687 - Implement csp for Module Workers; r=evilpie,asuth,rpl,ckerschb
Depends on D155691

Differential Revision: https://phabricator.services.mozilla.com/D156102
2023-01-18 13:46:33 +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
Nika Layzell
59be033e1c Bug 1809753 - Part 1: Remove quantum-dom nsIThread::EventTarget methods, r=mccr8
We aren't likely to try to make these changes any time soon, so cleaning out
these unnecessary methods which just return `this` will simplify things.

I was unable to find any calls to the `.eventTarget` getter in JS, which makes
sense, as the nsIThread type is only really used in JS as a wrapper around the
main thread in older code. Because of that, it has been removed as well.

Differential Revision: https://phabricator.services.mozilla.com/D166605
2023-01-16 23:14:10 +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
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
Nika Layzell
f410f28a30 Bug 1809753 - Part 1: Remove quantum-dom nsIThread::EventTarget methods, r=mccr8
We aren't likely to try to make these changes any time soon, so cleaning out
these unnecessary methods which just return `this` will simplify things.

I was unable to find any calls to the `.eventTarget` getter in JS, which makes
sense, as the nsIThread type is only really used in JS as a wrapper around the
main thread in older code. Because of that, it has been removed as well.

Differential Revision: https://phabricator.services.mozilla.com/D166605
2023-01-16 23:14:10 +00:00
Norisz Fay
8cf029b070 Backed out 15 changesets (bug 1247687) as requested by dev CLOSED TREE
Backed out changeset 81d052cabf84 (bug 1247687)
Backed out changeset d698041e5174 (bug 1247687)
Backed out changeset 2adf67f910e8 (bug 1247687)
Backed out changeset 0bc871906e97 (bug 1247687)
Backed out changeset 1700d5b79273 (bug 1247687)
Backed out changeset 31888ffde37a (bug 1247687)
Backed out changeset 9153182c650d (bug 1247687)
Backed out changeset 45de9ffeec19 (bug 1247687)
Backed out changeset 59207e959b7c (bug 1247687)
Backed out changeset 49f18430c465 (bug 1247687)
Backed out changeset 0ae1fd421d4f (bug 1247687)
Backed out changeset 7770ec4717fd (bug 1247687)
Backed out changeset 68b476066248 (bug 1247687)
Backed out changeset c94a9dc60dff (bug 1247687)
Backed out changeset 0ab366c6eaaf (bug 1247687)
2022-12-21 10:48:15 +02:00
Yulia Startsev
dcbacd54c8 Bug 1247687 - Implement csp for Module Workers; r=evilpie,asuth,rpl,ckerschb
Depends on D155691

Differential Revision: https://phabricator.services.mozilla.com/D156102
2022-12-20 20:56:15 +00:00
Csoregi Natalia
c382c6a7ca Backed out 16 changesets (bug 1247687) for frequent string bundle related crashes with PDF viewer (bug 1806064). a=backout
Backed out changeset 721f612fd09f (bug 1247687)
Backed out changeset c6c5750cf713 (bug 1247687)
Backed out changeset 5d05ab0c7cde (bug 1247687)
Backed out changeset 2429599729cb (bug 1247687)
Backed out changeset 55f13fb4ee3f (bug 1247687)
Backed out changeset 354711cf113a (bug 1247687)
Backed out changeset 40b8abaf1c0b (bug 1247687)
Backed out changeset 0c9650a1ac48 (bug 1247687)
Backed out changeset e7b103c79b1a (bug 1247687)
Backed out changeset 4dbd510fb042 (bug 1247687)
Backed out changeset 9276c7e1ddd9 (bug 1247687)
Backed out changeset 6ee318df6641 (bug 1247687)
Backed out changeset 6c129bd72b61 (bug 1247687)
Backed out changeset 4b0a4fcc6894 (bug 1247687)
Backed out changeset 34680059b9f0 (bug 1247687)
Backed out changeset 85b827971a48 (bug 1247687)
2022-12-17 11:27:32 +02:00
Yulia Startsev
4916e53611 Bug 1247687 - Implement csp for Module Workers; r=evilpie,asuth,rpl,ckerschb
Depends on D155691

Differential Revision: https://phabricator.services.mozilla.com/D156102
2022-12-14 14:55:38 +00:00
Nika Layzell
f001853338 Bug 1799692 - Part 1: Introduce ThreadsafeContentParentHandle, r=asuth
This introduces a new type to ContentParent which acts as a weak handle to the
actor and is safe to hold and manipulate from any thread.

This replaces accesses of the `ContentParent` type from the background thread,
as they were error-prone due to ContentParent not being threadsafe-refcounted.

The bulk of this patch is piping the new type through to the places it is
required, and removing now-unecessary extra complexity.

Differential Revision: https://phabricator.services.mozilla.com/D162346
2022-11-29 20:41:46 +00:00
Harveer Singh
3cc86ce9fd Bug 1792307: Fixing failing marionette test_cache_delete_after_shutdown test.r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D160574
2022-11-01 14:09:41 +00:00
Jan Varga
a263957571 Bug 1791762 - CreateFileInputStream, CreateFileOutputStream and CreateFileInputOutputStream should return MovingNotNull<T> instead of NotNull<T>; r=dom-storage-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D157819
2022-10-28 14:27:19 +00:00
Jan Varga
0f575aa31c Bug 1791755 - Extract OriginInfo, GroupInfo, GroupInfoPair and QuotaObject into separate source files; r=dom-storage-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D157815
2022-10-28 08:22:49 +00:00
Sean Feng
125a2e14fa Bug 1785331 - Make test_cache_padding.html to actually load the test_cache_add.js file r=necko-reviewers,valentin
This file is being fetched with a 404 error which is not expected.

Differential Revision: https://phabricator.services.mozilla.com/D158857
2022-10-27 19:18:13 +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