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

393 Коммитов

Автор SHA1 Сообщение Дата
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
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Jan Varga 4a6e04dc62 Bug 1676411 - Fix usage calculation for file:// (and potentially other) URIs; r=asuth,dom-workers-and-storage-reviewers
This patch improves the required consistency between GetStorageOriginKey and
GetLocalStorageQuotaKey.

Differential Revision: https://phabricator.services.mozilla.com/D96583
2020-11-13 19:51:08 +00:00
Jan Varga 99fe7a41c3 Bug 1676973 - Special characters need to be escaped when used in a SQL LIKE statement; r=asuth,dom-workers-and-storage-reviewers
Depends on D96931

Differential Revision: https://phabricator.services.mozilla.com/D96932
2020-11-13 05:26:24 +00:00
Jan Varga cc1746845f Bug 1676829 - Don't try to enable WAL journal mode for in-memory database; r=asuth,dom-workers-and-storage-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96852
2020-11-12 21:40:44 +00:00
Jan Varga ccfaf45c12 Bug 1676410 - Fix a regression caused by a change done in bug 1165214; r=asuth,dom-workers-and-storage-reviewers,sg
The missing % resulted in returning zero usage.

Differential Revision: https://phabricator.services.mozilla.com/D96578
2020-11-11 21:54:46 +00:00
Jan Varga efd0776947 Bug 1669437 - Enable full sharing of private browsing data across content processes (using the in-memory database in the parent process); r=asuth,dom-workers-and-storage-reviewers
This patch makes LocalStorageCache::Persist properly return true for the private
browsing case so that private browsing data will be sent to the parent (and also
loaded from the parent when accessed for the first time).
This was intentionally separated to make it clear where the decision is made.

Differential Revision: https://phabricator.services.mozilla.com/D96566
2020-11-11 14:05:00 +00:00
Jan Varga 03e0a91794 Bug 1669437 - Add necessary infrastructure for independent in-memory only local storage database; r=asuth,dom-workers-and-storage-reviewers
The new infrastructure consists of a separate bridge between the content and the
parent process and a separate local storage database in the parent process.
The new infrastructure can be used for storing and sharing of private browsing
data across content processes.
This patch only creates necessary infrastructure, actual enabling of storing and
sharing of data across content processes will be done in a follow-up patch.

Differential Revision: https://phabricator.services.mozilla.com/D96562
2020-11-11 13:12:57 +00:00
Jan Varga f889732fdd Bug 1669437 - Get rid of the private data set; r=asuth,dom-workers-and-storage-reviewers
The caches for private browsing are already separated by the private browsing
origin attribute, so there's no need to have a special data set (inside the
cache object) for it.

Differential Revision: https://phabricator.services.mozilla.com/D96531
2020-11-11 07:06:20 +00:00
Andi-Bogdan Postelnicu 06adde3adb Bug 1626555 - Add `dom/storage` to the list of non-unified-build-compatible directories. r=sg
Depends on D96442

Differential Revision: https://phabricator.services.mozilla.com/D96530
2020-11-10 12:00:30 +00:00
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