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

407 Коммитов

Автор SHA1 Сообщение Дата
Kashav Madan 6f9ccaf7d9 Bug 1722485 - Only flush session storage if we have SessionStore.jsm, r=nika
This is a browser-only module, and loading it for storage flushes causes errors
in GeckoView.

Differential Revision: https://phabricator.services.mozilla.com/D121776
2021-08-05 19:33:04 +00:00
Kashav Madan 5781dca888 Bug 1720688 - Support extended attribute syntax in protocol declarations, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D119975
2021-07-22 02:24:43 +00:00
Paul Zuehlcke da24464574 Bug 1713139 - Clear partitioned storage for session storage and legacy localStorage implementation. r=dom-storage-reviewers,johannh,asuth
Differential Revision: https://phabricator.services.mozilla.com/D116607
2021-07-06 21:10:58 +00:00
Jan Varga 88895254bf Bug 1717814 - LSNG: End explicit snapshots while IPC is still available; r=dom-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D118588
2021-06-23 14:27:51 +00:00
Andreas Farre 03d1f5a511 Bug 1710004 - Part 2: Make it possible to pre load data into BackgroundSessionStorageManager. r=asuth
This makes it possible to do the session storage restoration for
session restore from the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D116007
2021-06-08 13:42:33 +00:00
Andreas Farre 6481b507ac Bug 1710004 - Part 1: Remove dataset concept from Session Storage. r=asuth
Session Storage used to share implementation with Local Storage, where
a distinction of a default data set from a session data set made
sense. In Session Storage all data is actually scoped by the
session. Since Bug 1322316 Session Storage no longer share
implementation with Local Storage, which makes it safe to collapse the
datasets in Session Storage to one dataset, which makes life easier,
especially for Session (Re-)Store.

Differential Revision: https://phabricator.services.mozilla.com/D116609
2021-06-08 13:42:33 +00:00
Petr Sumbera 20dc1481c8 Bug 1713174 - add missing ScopeExit header r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D116156
2021-05-29 19:32:56 +00:00
Andreas Farre 3dd66dc912 Part 9: Bug 1700623 - Notify main thread about storage updates periodically. r=asuth
This is used to update session store storage contents continuously.

Depends on D111435

Differential Revision: https://phabricator.services.mozilla.com/D114586
2021-05-26 07:14:07 +00:00
Andreas Farre 1e98905bd8 Part 6: Bug 1700623 - Add data querying to SessionStorageManager in parent process. r=nika,dom-storage-reviewers,asuth
To collect session storage data for session store, we make it possible
to query the background session storage managar for data.

Depends on D111432

Differential Revision: https://phabricator.services.mozilla.com/D111433
2021-05-26 07:14:05 +00:00
Andreas Farre 15dabb40c0 Part 2: Bug 1700623 - Pass the storage principal to SessionStorageManager::EnsureCache. r=dom-storage-reviewers,asuth
Passing the storage principal makes data end up in the correct bucket
keyed by the origin attribute in SessionStorageManagerBase::mOATable.

Depends on D111428

Differential Revision: https://phabricator.services.mozilla.com/D111429
2021-05-26 07:14:04 +00:00
Alexandru Michis 84d8f14b41 Backed out 9 changesets (bug 1700623) for causing bc failures in browser_history_menu.js
CLOSED TREE

Backed out changeset 5eae296ad8b5 (bug 1700623)
Backed out changeset 97c3add3b00a (bug 1700623)
Backed out changeset 7ab483627a27 (bug 1700623)
Backed out changeset a4e673640de5 (bug 1700623)
Backed out changeset 513ea16be430 (bug 1700623)
Backed out changeset 88b4add342df (bug 1700623)
Backed out changeset c13bdee1b526 (bug 1700623)
Backed out changeset 26df421dac02 (bug 1700623)
Backed out changeset 6cd0b7a269e5 (bug 1700623)
2021-05-21 11:43:54 +03:00
Andreas Farre a0d376b551 Part 9: Bug 1700623 - Notify main thread about storage updates periodically. r=asuth
This is used to update session store storage contents continuously.

Depends on D111435

Differential Revision: https://phabricator.services.mozilla.com/D114586
2021-05-20 12:48:24 +00:00
Andreas Farre d1e7d2a409 Part 6: Bug 1700623 - Add data querying to SessionStorageManager in parent process. r=nika,dom-storage-reviewers,asuth
To collect session storage data for session store, we make it possible
to query the background session storage managar for data.

Depends on D111432

Differential Revision: https://phabricator.services.mozilla.com/D111433
2021-05-20 12:48:22 +00:00
Andreas Farre 73a2c95252 Part 2: Bug 1700623 - Pass the storage principal to SessionStorageManager::EnsureCache. r=dom-storage-reviewers,asuth
Passing the storage principal makes data end up in the correct bucket
keyed by the origin attribute in SessionStorageManagerBase::mOATable.

Depends on D111428

Differential Revision: https://phabricator.services.mozilla.com/D111429
2021-05-20 12:48:21 +00:00
Simon Giesecke cc730d05dd Bug 1184468 - Use nsTHashtable::Keys where possible. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D108588
2021-03-24 17:56:50 +00:00
Simon Giesecke 613e20d136 Bug 1184468 - Use nsBaseHashtable::Values. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D108587
2021-03-24 17:56:49 +00:00
Simon Giesecke b4f4396431 Bug 708901 - Migrate to nsTHashSet in dom/storage. r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D109325
2021-03-24 17:56:48 +00:00
Csoregi Natalia f54ee076ae Backed out 13 changesets (bug 708901, bug 1184468) for causing build bustage on GeckoViewHistory.cpp. CLOSED TREE
Backed out changeset b1e4c01e63b8 (bug 708901)
Backed out changeset 37b52cce83c0 (bug 708901)
Backed out changeset eee75f33f060 (bug 708901)
Backed out changeset 479bf64c7986 (bug 708901)
Backed out changeset 15a8fb94d15d (bug 708901)
Backed out changeset be31ccd9a61d (bug 708901)
Backed out changeset fc54f4eaedd5 (bug 708901)
Backed out changeset 03c3a56c3d13 (bug 708901)
Backed out changeset 73f11d3c1298 (bug 708901)
Backed out changeset aed22fd80893 (bug 708901)
Backed out changeset 74d8249fbe7e (bug 708901)
Backed out changeset acb725eb3c1d (bug 1184468)
Backed out changeset 70f3ea6efec4 (bug 1184468)
2021-03-24 19:26:20 +02:00
Simon Giesecke 585982933c Bug 708901 - Migrate to nsTHashSet in dom/storage. r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D109325
2021-03-24 16:59:00 +00:00
Simon Giesecke b9621d6376 Bug 1695162 - Use range-based for instead of custom hashtable iterators. r=xpcom-reviewers,kmag
Differential Revision: https://phabricator.services.mozilla.com/D108585
2021-03-17 15:49:46 +00:00
Simon Giesecke ad01a10a3b Bug 1634281 - Use nsTHashMap instead of nsDataHashtable. r=xpcom-reviewers,necko-reviewers,jgilbert,nika,valentin
Note that this patch only transforms the use of the nsDataHashtable type alias
to a directly equivalent use of nsTHashMap. It does not change the specification
of the hash key type to make use of the key class deduction that nsTHashMap
allows for in some cases. That can be done in a separate step, but requires more
attention.

Differential Revision: https://phabricator.services.mozilla.com/D106008
2021-03-10 10:47:47 +00:00
Simon Giesecke bc9766c354 Bug 1634281 - Use nsTHashMap for nsBaseHashtable/nsDataHashtable uses with RefPtr data type. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D105963
2021-03-09 11:39:36 +00:00
Jan Varga eeb8cf2781 Bug 1695883 - Add explicit fallible mozStorageTransaction::Start method for starting the transaction; r=dom-storage-reviewers,sg
The new method is mandatory because mozStorageTransaction constructor no longer
starts the transaction. It must be started explicitely.

All consumers have been adjusted, but only dom/quota, dom/indexedDB, dom/cache,
dom/localstorage and dom/storage handle the error. Other components like
netwerk/cache, netwerk/cookie and toolkit/components currently only warn on
failure to start a transaction. Bug 1696129, 1696130 and 1696133 have been
filed for proper handling of transaction start failures in those components.

Differential Revision: https://phabricator.services.mozilla.com/D106893
2021-03-04 04:38:06 +00:00
Olli Pettay 8871d57cd7 Bug 1689601, remove an assertion in SessionStorageManager.cpp since it isn't valid anymore with bfcache, r=peterv,ttung
Differential Revision: https://phabricator.services.mozilla.com/D105233
2021-03-02 12:13:18 +00:00
Mihai Alexandru Michis 87f481bf9a Backed out 16 changesets (bug 1689601) for causing cpp bustages in nsFrameLoader.
CLOSED TREE

Backed out changeset 6e5523a7210d (bug 1689601)
Backed out changeset 745eaa468c74 (bug 1689601)
Backed out changeset a594bd02b8b6 (bug 1689601)
Backed out changeset 0c5fe977ced6 (bug 1689601)
Backed out changeset 2fca23521891 (bug 1689601)
Backed out changeset 334aeb627855 (bug 1689601)
Backed out changeset 2b2081a15d67 (bug 1689601)
Backed out changeset 307bde43cc96 (bug 1689601)
Backed out changeset 04aadec67ce2 (bug 1689601)
Backed out changeset 701eccb34772 (bug 1689601)
Backed out changeset 278db692aa8b (bug 1689601)
Backed out changeset c261c243a64d (bug 1689601)
Backed out changeset 7e8022e5696a (bug 1689601)
Backed out changeset 6138bfc6c08d (bug 1689601)
Backed out changeset 63295b3a62d0 (bug 1689601)
Backed out changeset 6d02e59ddc51 (bug 1689601)
2021-03-02 13:15:10 +02:00
Olli Pettay 787048eb87 Bug 1689601, remove an assertion in SessionStorageManager.cpp since it isn't valid anymore with bfcache, r=peterv,ttung
Differential Revision: https://phabricator.services.mozilla.com/D105233
2021-03-02 09:44:10 +00:00
Jens Stutte 1e19379853 Bug 1689953: Harmonize shutdown phase definitions across nsTerminator and AppShutdown r=dthayer,chutten
This patch wants to solve several quirks around the shutdown terminator.

 - Use the same shutdown phase definitions in AppShutdown and nsTerminator. This touches quite a few files.
 - Ensure that the terminator phase shift is handled before any shutdown observer notifications are sent and reduce its heartbeat duration.
 - Add missing phases to the shutdown telemetry.

Please note that this changes the unit of "tick" to 100ms rather than 1s.
As a side effect, we also remove the obsolete "shutdown-persist" context.

While the existing test coverage continues to prove the most important functions, we acknowledge the wish for better test coverage with [[ https://bugzilla.mozilla.org/show_bug.cgi?id=1693966 | bug 1693966 ]].

Differential Revision: https://phabricator.services.mozilla.com/D103626
2021-02-27 14:38:14 +00:00
Butkovits Atila bb3fe218a4 Backed out changeset be43a81b35f9 (bug 1689953) for causing failure at test_terminator_record.js. CLOSED TREE 2021-02-27 05:03:11 +02:00
Jens Stutte f6d52040b9 Bug 1689953: Harmonize shutdown phase definitions across nsTerminator and AppShutdown r=dthayer,chutten
This patch wants to solve several quirks around the shutdown terminator.

 - Use the same shutdown phase definitions in AppShutdown and nsTerminator. This touches quite a few files.
 - Ensure that the terminator phase shift is handled before any shutdown observer notifications are sent and reduce its heartbeat duration.
 - Add missing phases to the shutdown telemetry.

Please note that this changes the unit of "tick" to 100ms rather than 1s.
As a side effect, we also remove the obsolete "shutdown-persist" context.

While the existing test coverage continues to prove the most important functions, we acknowledge the wish for better test coverage with [[ https://bugzilla.mozilla.org/show_bug.cgi?id=1693966 | bug 1693966 ]].

Differential Revision: https://phabricator.services.mozilla.com/D103626
2021-02-26 21:33:29 +00:00
Simon Giesecke 371c154035 Bug 1693541 - Improve uses of nsBaseHashtable and descendants and avoid multiple subsequent lookups in dom/storage. r=dom-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D106091
2021-02-26 11:36:41 +00:00
Simon Giesecke 0b443059fd Bug 1693306 - Simplify some uses of LookupOrInsertWith by GetOrInsertNew. r=xpcom-reviewers,necko-reviewers,dragana,nika
Differential Revision: https://phabricator.services.mozilla.com/D105479
2021-02-26 09:22:54 +00:00
Simon Giesecke 9af107a839 Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.

Differential Revision: https://phabricator.services.mozilla.com/D105473
2021-02-26 09:11:46 +00:00
Simon Giesecke 4f75368dcb Bug 1691913 - Rename nsBaseHashtable::GetOrInsert(With) to LookupOrInsert(With). r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
The functions should be called "Lookup" rather than "Get" because they return
a DataType& (rather than UserDataType).

Differential Revision: https://phabricator.services.mozilla.com/D105472
2021-02-26 09:11:45 +00:00
Simon Giesecke c5f7800f35 Bug 1691913 - Rename nsClassHashtable::LookupOrAdd to GetOrInsertNew. r=xpcom-reviewers,nika
It should be called "Get" rather than "Lookup" because it returns
UserDataType. "Add" is called "Insert" in the other methods.

Differential Revision: https://phabricator.services.mozilla.com/D105470
2021-02-22 12:07:47 +00:00
Simon Giesecke d2caea36fa Bug 1691894 - Simplify uses of WithEntryHandle that only use OrInsert(With) by using GetOrInsertWith. r=xpcom-reviewers,necko-reviewers,jgilbert,nika
Differential Revision: https://phabricator.services.mozilla.com/D104676
2021-02-22 12:07:46 +00:00
Simon Giesecke 661e25bf09 Bug 1692880 - Make Put accept DataType instead of wrapping UserDataType. r=xpcom-reviewers,necko-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D104850
2021-02-16 15:53:33 +00:00
Simon Giesecke 767b2bb664 Bug 1689680 - Add StorageDBUpdater::CreateCurrentSchema and call that if we know we have a fresh database file. r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D104716
2021-02-16 08:55:15 +00:00
Simon Giesecke 780a1636a9 Bug 1691894 - Replace several suboptimal uses of Put after Get by GetOrInsertWith or WithEntryHandle. r=xpcom-reviewers,necko-reviewers,kmag,valentin,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D104849
2021-02-15 15:12:17 +00:00
smolnar 1afbbe67e1 Backed out 5 changesets (bug 1691894) for causing hazard failures in nsXULPrototypeCache. CLOSED TREE
Backed out changeset 22dc870ee609 (bug 1691894)
Backed out changeset 58c31e9d6ae3 (bug 1691894)
Backed out changeset 7483e84149d8 (bug 1691894)
Backed out changeset f977d6cfa973 (bug 1691894)
Backed out changeset db4503476f34 (bug 1691894)
2021-02-15 16:43:23 +02:00
Simon Giesecke 3c29a68440 Bug 1691894 - Make Put accept DataType instead of wrapping UserDataType. r=xpcom-reviewers,necko-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D104850
2021-02-15 10:04:46 +00:00
Simon Giesecke 8973094ec1 Bug 1691894 - Replace several suboptimal uses of Put after Get by GetOrInsertWith or WithEntryHandle. r=xpcom-reviewers,necko-reviewers,kmag,valentin,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D104849
2021-02-15 10:04:45 +00:00
Simon Giesecke 8444825010 Bug 1688833 - Migrate LookupForAdd to WithEntryHandle in dom/storage. r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D104217
2021-02-09 18:19:40 +00:00
Simon Giesecke 98a80aee92 Bug 1682536 - Use NotNull with WriteInfo. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D100091
2021-01-21 11:58:47 +00:00
Tom Tung 15704220ee Bug 1683299 - Introduce site quota for legacy LocalStorage; r=dom-workers-and-storage-reviewers,janv
This patch:
- adds a new pref for site quota.
- sets 25 MB as the default site qutoa.
- renames LocalStorageManager::GetQuota() to LocalStorageManager::GetOriginQuota().
- adds LocalStorageManager::GetSiteQuota().
- updates LocalStorage quota tests.

Differential Revision: https://phabricator.services.mozilla.com/D101756
2021-01-14 16:01:17 +00:00
Narcis Beleuzu 0052c4f9a0 Backed out changeset 298059db2b0c (bug 1683299) for xpcshell failures on test_archive.js 2021-01-14 21:15:46 +02:00
Tom Tung 45ce146298 Bug 1683299 - Introduce site quota for legacy LocalStorage; r=dom-workers-and-storage-reviewers,janv
This patch:
- adds a new pref for site quota.
- sets 25 MB as the default site qutoa.
- renames LocalStorageManager::GetQuota() to LocalStorageManager::GetOriginQuota().
- adds LocalStorageManager::GetSiteQuota().
- updates LocalStorage quota tests.

Differential Revision: https://phabricator.services.mozilla.com/D101756
2021-01-14 16:01:17 +00:00
Jan Varga b50ec7be6a Bug 1683299 - Restore semi-broken behaviour before bug 1676410 and bug 1676973; r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D101726
2021-01-14 09:32:00 +00:00
Tom Tung 80a5716001 Bug 1656768 - Propagate SessionStorage data in BackgroundSessionStorageManager to the new top browsing context while replacing the top context id; r=nika,dom-workers-and-storage-reviewers,asuth
### Story

While the exisiting top browsing context is replaced, SessionStorage relies on
itself been propagated by SessionStore. However, this has been disabled in
SessionHistory in the parent process.

Therefore, we need to propagate SessionStorage data by propagating
BackgroundSessionStorageManager.

### Notes

This patch assumes that the target top-level browsing context shouldn't have
been registered to BackgroundSessionStorageManager. If this can happen, we will
either need to merge SessionStorage data into it or find a proper (earlier)
place to update sManagers.

### Test Plan

Test: D97763
Try: https://treeherder.mozilla.org/jobs?repo=try&revision=2acc7b393fb80b640f4fbe3ade1da7dd440c380e&selectedTaskRun=KK6XhR-sQuqv5lcntVLc2w.0

Differential Revision: https://phabricator.services.mozilla.com/D98082
2020-12-03 14:19:35 +00:00
Simon Giesecke dd80614fa0 Bug 1678062 - Remove unnecessary includes. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D97467

Depends on D96561
2020-11-23 16:12:02 +00:00
Simon Giesecke d10d03d076 Bug 1676365 - Move SpinEventLoopUntil to separate header. r=#xpcom-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96556

Depends on D96554
2020-11-23 16:10:41 +00:00