Commit Graph

1268 Commits

Author SHA1 Message Date
Jan Varga
565ba82665 Bug 1866217 - Replace some nsIQuotaManagerService::GetUsageForPrincipal calls with nsIQuotaManagerService::GetCachedUsageForPrincipal; r=dom-storage-reviewers,jari
There's now a dedicated nsIQuotaManagerService::GetCachedUsageForPrincipal
method for getting cached origin usage. All callers of
nsIQuotaManagerService::GetUsageForPrincipal which want to get cached origin
usage for given principal can be now converted to call the new method.

Differential Revision: https://phabricator.services.mozilla.com/D195363
2024-08-12 16:36:39 +00:00
Peter Van der Beken
c2b9f227d0 Bug 1906744 - Check if constructor is enabled before installing named property. r=mccr8,dom-storage-reviewers,janv,asuth,eemeli
Differential Revision: https://phabricator.services.mozilla.com/D216671
2024-08-08 16:35:19 +00:00
Narcis Beleuzu
88649c8662 Backed out changeset 393ab27c060b (bug 1906744) for Hazard bustages on Localization.cpp 2024-08-07 00:57:51 +03:00
Peter Van der Beken
d9561590dd Bug 1906744 - Check if constructor is enabled before installing named property. r=mccr8,dom-storage-reviewers,janv,asuth,eemeli
Differential Revision: https://phabricator.services.mozilla.com/D216671
2024-08-06 15:29:04 +00:00
Iulian Moraru
1506481d39 Backed out changeset e9975f346b2b (bug 1906744) for causing multiple failures. CLOSED TREE 2024-08-05 20:44:20 +03:00
Peter Van der Beken
8d64c21390 Bug 1906744 - Check if constructor is enabled before installing named property. r=mccr8,dom-storage-reviewers,janv,asuth,eemeli
Differential Revision: https://phabricator.services.mozilla.com/D216671
2024-08-05 15:58:56 +00:00
Tamas Szentpeteri
21a146b83e Backed out changeset 2fa58daa8086 (bug 1906744) for causing mochitest browser time outs. CLOSED TREE 2024-07-26 19:33:31 +03:00
Peter Van der Beken
47c9fe0b2b Bug 1906744 - Check if constructor is enabled before installing named property. r=mccr8,dom-storage-reviewers,janv,asuth
Differential Revision: https://phabricator.services.mozilla.com/D216671
2024-07-26 15:08:34 +00:00
Sylvestre Ledru
a3ea006705 Bug 1519636 - Reformat recent changes to the Google coding style r=emilio,necko-reviewers,geckoview-reviewers,application-update-reviewers,media-playback-reviewers,devtools-reviewers,anti-tracking-reviewers,profiler-reviewers,win-reviewers,migration-reviewers,padenot,mconley,nchevobbe,kershaw,gstoll,mstange,bytesized,m_kato
This new version of clang 17 also slightly changed the formatting.

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D215914
2024-07-17 11:15:31 +00:00
Jan Varga
0d373bc154 Bug 1906041 - Rename Ensure(Persistent|Temporary)OriginIsInitialized to Ensure(Persistent|Temporary)OriginIsInitializedInternal; r=dom-storage-reviewers,jari
One of the goals of the asynchronous temporary storage initialization is to
call Ensure(Persistent|Temporary)OriginIsInitialized only from
Initialize(Persistent|Temporary)OriginOp. Calling from other places including
quota clients will be disallowed by changing the method to a private method.
The private nature of the method should be emphasized by adding the Internal
suffix.

Differential Revision: https://phabricator.services.mozilla.com/D192150
2024-07-16 10:43:40 +00:00
Jan Varga
0de36a844f Bug 1906041 - Simplify signature of QuotaManager::EnsureTemporaryOriginIsInitialized; r=dom-storage-reviewers,jari
EnsureTemporaryOriginIsInitialized currently takes two separate arguments which
can be expressed as just one argument.

Differential Revision: https://phabricator.services.mozilla.com/D192149
2024-07-16 10:43:39 +00:00
Thomas Wisniewski
11e391c9f5 Bug 697151 - distinguish between SYNC and ASYNC XMLHttpRequests in nsIContentPolicy types, and have ChannelEventQueue::MaybeSuspendIfEventsAreSuppressed only suspend async ones; r=nika,necko-reviewers,peterv,dom-storage-reviewers,asuth,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D213516
2024-06-24 18:45:18 +00:00
Tom Schuster
feaa0c77a1 Bug 1904004 - Use OriginAttributes::IsPrivateBrowsing instead of open coding PBM checks. r=timhuang,cookie-reviewers,anti-tracking-reviewers,profiler-reviewers,necko-reviewers,kershaw,dom-storage-reviewers,janv,canaltinova,dom-worker-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D214532
2024-06-24 11:06:18 +00:00
Jan Varga
e87e849e0f Bug 1883353 - Require to always drop directory locks explicitly; r=dom-storage-reviewers,jari
Until now, directory locks were dropped when the last strong reference was
removed or after calling Drop explicitly. The dependency on ref-counting makes
it less obvious when directory locks are dropped for real and it's also
difficult to release them asynchronously eventually. This patch removes the
directory lock unregistration from the destructor, so from now on, directory
locks must be always dropped explicitly.

Differential Revision: https://phabricator.services.mozilla.com/D197294
2024-06-14 07:21:24 +00:00
Harveer Singh
be8935e470 Bug 1799717: Adding a try/catch block in the test to exempt some known possible failures.r=jari
Differential Revision: https://phabricator.services.mozilla.com/D210174
2024-05-13 21:07:26 +00:00
Harveer Singh
b984eaa428 Bug 1799717: Added some more diagnostics to diagnose test_caches_delete_after_shutdown.py.r=jari
Differential Revision: https://phabricator.services.mozilla.com/D209977
2024-05-10 17:46:50 +00:00
hsingh
59b1ebf0a9 Bug 1799717: Adding some diagnostics to debug intermittent marionette test.r=jstutte
Differential Revision: https://phabricator.services.mozilla.com/D198752
2024-04-30 14:04:25 +00:00
Jens Stutte
c3163ba9a5 Bug 1890291 - Do not shutdown StreamControl before all streams are closed. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D204536
2024-04-26 12:37:54 +00:00
Nika Layzell
1e2dd10a71 Bug 1724083 - Part 2: Update Actor destruction checks for new manager list behaviour, r=ipc-reviewers,mccr8
After the changes in the previous part, actors are now removed from their
manager's managed list before invoking ActorDestroy. There were a few places in
tree which specifically checked for the old behaviour, due to calls from the
managed actor during ActorDestroy to potentially trigger clean-up.

This patch adjusts these checks to instead expect a count of `0` as the actor
will now already have been removed at that point.

Differential Revision: https://phabricator.services.mozilla.com/D198841
2024-04-22 17:31:06 +00:00
Mike Conley
a45d00e343 Bug 1891141 - Add configuration parameters for pages per step and step delay to mozIStorageAsyncConnection.backupToFileAsync. r=mak
This also fixes a bug in the test_connection_online_backup.js test which wasn't
properly evaluating that the page_size PRAGMA was being copied properly.

Differential Revision: https://phabricator.services.mozilla.com/D207471
2024-04-17 20:50:47 +00:00
Ryan VanderMeulen
e7a093d50c Bug 1883629 - Update Snappy to version 1.2.0. r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D203634
2024-04-08 13:48:06 +00:00
Emilio Cobos Álvarez
4fdaffa12c Bug 1889590 - Make cache DB use utf-8 for referrer strings. r=dom-storage-reviewers,janv,asuth
My understanding is that this should be safe to do. These have always
been utf-8 strings / urls anyways, and sqlite seems to handle returning
a TEXT field in both utf16 and utf8, and the DB should already use utf-8
encoding, so this change should just work, ideally?

But I'm not the most familiar with all that code so worth a
double-check.

Differential Revision: https://phabricator.services.mozilla.com/D206611
2024-04-05 07:16:33 +00:00
Emilio Cobos Álvarez
de09ab0dd6 Bug 1887719 - More consistently use UTF8String/nsCString for URLs. r=necko-reviewers,webidl,anti-tracking-reviewers,places-reviewers,jari,kershaw,janv,smaug,hsivonen
Sorry for the massive patch but I found it hard to split without
introducing a bunch of copies around...

This mostly makes necko and DOM agree on which strings to use, which
should result on less copies and conversions.

Differential Revision: https://phabricator.services.mozilla.com/D205601
2024-04-04 11:49:57 +00:00
Andrew Sutherland
4223b0b566 Bug 1887833 - Downgrade Cache API DB inconsistency assertion. r=dom-storage-reviewers,janv
We are downgrading this assertion since it's clearly happening and we
want a patch that is upliftable to beta; we will investigate and
address the potential logic problem separately.  (It could also just
be flipped memory bits; we need to investigate.)

Differential Revision: https://phabricator.services.mozilla.com/D206027
2024-03-28 16:38:09 +00:00
Jens Stutte
476c9374f3 Bug 1727526 - Abort DBAction::RunOnTarget if AppShutdown::IsInOrBeyond(ShutdownPhase::AppShutdownQM) r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D204587
2024-03-18 14:27:34 +00:00
Jens Stutte
07a7841983 Bug 1727526 - Add diagnostic assertions for StreamList to verify mList's book keeping. r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D204535
2024-03-18 14:27:34 +00:00
Marco Bonardo
5cac8986d2 Bug 1884308 - Chunk bookmark GUIDs when retrieving details to avoid going over Sqlite variables limit. r=mconley,places-reviewers,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D204660
2024-03-15 16:18:00 +00:00
Dave Townsend
8c6a552556 Bug 1864896: Autofix unused function arguments (dom). r=emilio,media-playback-reviewers,dom-storage-reviewers,padenot,janv
Differential Revision: https://phabricator.services.mozilla.com/D202962
2024-03-04 15:44:59 +00:00
Peter Van der Beken
a50f002c9b Bug 1640839 - Stop generating count of WebIDL enum values, use standard enum traits instead. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D201345
2024-03-02 07:50:25 +00:00
Peter Van der Beken
eebaaa23dc Bug 1640839 - Make WebIDL enum helper function to convert to string return an actual string. r=mccr8,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D201337
2024-03-02 07:50:21 +00:00
Natalia Csoregi
10b9ceb789 Backed out 13 changesets (bug 1640839) for causing bustage on Element.cpp CLOSED TREE
Backed out changeset 179ceb82c9e5 (bug 1640839)
Backed out changeset 73f498a821f0 (bug 1640839)
Backed out changeset dc2d3d0e0365 (bug 1640839)
Backed out changeset ddc989ac0509 (bug 1640839)
Backed out changeset e595bb3feea8 (bug 1640839)
Backed out changeset c85aca04e27f (bug 1640839)
Backed out changeset 98e8e3a4047a (bug 1640839)
Backed out changeset 59ef180517db (bug 1640839)
Backed out changeset af2f5e293662 (bug 1640839)
Backed out changeset 89aa6d9dc598 (bug 1640839)
Backed out changeset 67b722a722f9 (bug 1640839)
Backed out changeset 24a9665c6ced (bug 1640839)
Backed out changeset d93f199385e9 (bug 1640839)
2024-03-01 18:23:08 +02:00
Peter Van der Beken
22089d8166 Bug 1640839 - Stop generating count of WebIDL enum values, use standard enum traits instead. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D201345
2024-03-01 14:31:16 +00:00
Peter Van der Beken
171fc86507 Bug 1640839 - Make WebIDL enum helper function to convert to string return an actual string. r=mccr8,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D201337
2024-03-01 14:31:11 +00:00
hsingh
d3b62b3389 Bug 1858696: Created IDB and CacheAPI marionette tests to verify raw magic strings in on-disk storages.r=dom-storage-reviewers,webdriver-reviewers,whimboo,janv
Differential Revision: https://phabricator.services.mozilla.com/D192328
2024-02-02 15:14:24 +00:00
Gijs Kruitbosch
a1ea168c77 Bug 1780071 - autofix dom/ and layout/ violations of no-comparison-or-assignment-inside-ok r=media-playback-reviewers,dom-storage-reviewers,layout-reviewers,dom-core,emilio,mccr8,aosmond,tschuster,padenot,asuth
Differential Revision: https://phabricator.services.mozilla.com/D198976
2024-01-25 22:18:55 +00:00
Mike Conley
f27ff0993e Bug 1869060 - Add SQLite Online Backup API support via mozIStorageAsyncConnection. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D195934
2024-01-22 14:26:53 +00:00
Henrik Skupin
144fe1476d Bug 1836727 - [marionette] Fix MARIONETTE_MANIFESTS usage in moz.build files. r=webdriver-reviewers,necko-reviewers,application-update-reviewers,search-reviewers,sessionstore-reviewers,places-reviewers,dom-storage-reviewers,Standard8,jesup,jdescottes,nalexander,sclements,janv
Differential Revision: https://phabricator.services.mozilla.com/D197515
2024-01-11 10:34:29 +00:00
Jan Varga
aeaf137c6b Bug 1871799 - Fix relevant quota clients to always use QuotaVFS for database access; r=dom-storage-reviewers,asuth
Some quota clients currently use the BaseVFS (instead of QuotaVFS) during
origin initialization which makes sense at first glance (there's no need to
track usage when temporary storage is only being initialized).
However, QuotaVFS provides other important functionality besides quota checks
which is the overridden xFullPathname method. The overridden implementation is
needed to avoid file path normalization on Windows.
This patch changes relevant quota clients to always use QuotaVFS, even during
origin initialization to take advantage of the overriden xFullPathname method.
There will be no quota checks during origin initialization just like before
because the passed directory lock id is -1. GetQuotaObject will return nullptr
in that case.

Depends on D198187

Differential Revision: https://phabricator.services.mozilla.com/D198188
2024-01-10 21:10:14 +00:00
hsingh
8cbf174733 Bug 1863990: Created new helpers in quota_test_case.py.r=janv,dom-storage-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D195498
2024-01-09 15:42:26 +00:00
Tom Marble
4b00b49e47 Bug 1859908 - convert .ini manifests to .toml: batch 20 marionette.ini r=jmaher,webdriver-reviewers,necko-reviewers,application-update-reviewers,search-reviewers,sessionstore-reviewers,places-reviewers,dom-storage-reviewers,bytesized,kershaw,whimboo,dao,jesup,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D197206
2024-01-02 15:31:51 +00:00
hsingh
c294efd51a Bug 1871409: Moved back mInitRunnable clearing in Context::OnQuotaInit to its prior position.r=janv
Differential Revision: https://phabricator.services.mozilla.com/D197155
2023-12-22 16:18:13 +00:00
Jens Stutte
a696d9cd91 Bug 1870594 - Handle the no-CSCP case in StreamList::CloseAll. r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D196711
2023-12-21 06:53:25 +00:00
hsingh
33a724513a Bug 1869087: Properly handle QuotaInitRunnable failure in Context::OnQuotaInit.r=dom-storage-reviewers,janv
QuotaInitRunnable is invoked by Context to set up cache directory. This is not always successful as it could be
interrupted by shutdown or other filesystem issues. By the time in ran into error, it's possible that some objects
needed by Context are not yet initialized in QuotaInitRunnable::Run. Since QuotaInitRunnable internal state machine
will always transition to 'COMPLETING' and Context::OnQuotaInit would always be called; it's possible that some objects
like mDirectoryLock, mCipherKeyManager and mDirectoryMetadata didn't get initialized yet. As an effect, we should
only assert these objects being non-null in Context::OnQuotaInit if the QuotaInitRunnable was successful.

Differential Revision: https://phabricator.services.mozilla.com/D196113
2023-12-14 16:31:23 +00:00
Norisz Fay
a2413a9e0c Backed out changeset 04b0ed50a187 (bug 1869087) for causing multiple Quota related failures 2023-12-14 01:00:28 +02:00
hsingh
ec4cbf2fc7 Bug 1869087: Properly handle QuotaInitRunnable failure in Context::OnQuotaInit.r=dom-storage-reviewers,janv
QuotaInitRunnable is invoked by Context to set up cache directory. This is not always successful as it could be
interrupted by shutdown or other filesystem issues. By the time in ran into error, it's possible that some objects
needed by Context are not yet initialized in QuotaInitRunnable::Run. Since QuotaInitRunnable internal state machine
will always transition to 'COMPLETING' and Context::OnQuotaInit would always be called; it's possible that some objects
like mDirectoryLock, mCipherKeyManager and mDirectoryMetadata didn't get initialized yet. As an effect, we should
only assert these objects being non-null in Context::OnQuotaInit if the QuotaInitRunnable was successful.

Differential Revision: https://phabricator.services.mozilla.com/D196113
2023-12-13 18:24:33 +00:00
Joel Maher
4072dc32c4 Bug 1869590 - Batch 19 - convert remaining mochitest ini to toml. r=aryx,necko-reviewers,devtools-reviewers,dom-storage-reviewers,asuth,valentin,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D196203
2023-12-13 15:44:04 +00:00
Noemi Erli
c670ce0ba6 Backed out changeset f47f48be162a (bug 1869087) for causing crashes in StorageControllerTest CLOSED TREE 2023-12-13 05:46:07 +02:00
hsingh
08b837e173 Bug 1869087: Properly handle QuotaInitRunnable failure in Context::OnQuotaInit.r=dom-storage-reviewers,janv
QuotaInitRunnable is invoked by Context to set up cache directory. This is not always successful as it could be
interrupted by shutdown or other filesystem issues. By the time in ran into error, it's possible that some objects
needed by Context are not yet initialized in QuotaInitRunnable::Run. Since QuotaInitRunnable internal state machine
will always transition to 'COMPLETING' and Context::OnQuotaInit would always be called; it's possible that some objects
like mDirectoryLock, mCipherKeyManager and mDirectoryMetadata didn't get initialized yet. As an effect, we should
only assert these objects being non-null in Context::OnQuotaInit if the QuotaInitRunnable was successful.

Differential Revision: https://phabricator.services.mozilla.com/D196113
2023-12-13 00:57:19 +00:00
Jens Stutte
09e51b5d0e Bug 1727526 - Add more details to Context::Stringify. r=dom-storage-reviewers,janv
Depends on D191082

Differential Revision: https://phabricator.services.mozilla.com/D191084
2023-12-11 15:17:12 +00:00
Jens Stutte
349c746a19 Bug 1727526 - Have a Stringifyable base class. r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D191082
2023-12-11 15:17:12 +00:00