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

82 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 42b7f1a58c Bug 1780788 - Use abstract strings as in-arguments for ipdl. r=nika,necko-reviewers,media-playback-reviewers,alwu,dragana
This prevents copies and avoids the hack we have to avoid this, which
right now is using nsDependent{C,}String.

Non-virtual actors can still use `nsString` if they need to on the
receiving end.

Differential Revision: https://phabricator.services.mozilla.com/D152519
2022-07-25 20:19:48 +00:00
Cathy Lu df9bafbf73 Bug 1734394 - Make Geckoview use the session store collector r=geckoview-reviewers,agi,farre,peterv
When the session storage prefs are enabled, GeckoSession updateSessionState will provide the bundle of information, including zoom, scroll, and form data, to the delegate. Currently works for Fission and on Fenix.

Differential Revision: https://phabricator.services.mozilla.com/D148215
2022-07-15 20:44:55 +00:00
criss 95f4f0498b Backed out changeset 67fae8447273 (bug 1734394) for causing Assertion failures on StaticPrefList_browser.h. CLOSED TREE 2022-07-12 09:00:39 +03:00
Cathy Lu c89057028e Bug 1734394 - Make Geckoview use the session store collector r=geckoview-reviewers,agi,farre,peterv
When the session storage prefs are enabled, GeckoSession updateSessionState will provide the bundle of information, including zoom, scroll, and form data, to the delegate. Currently works for Fission and on Fenix.

Differential Revision: https://phabricator.services.mozilla.com/D148215
2022-07-12 02:50:01 +00:00
Noemi Erli d6440ec5b2 Backed out changeset 56a33c1c3210 (bug 1734394) for causing build bustages in GeckoBundleUtils.cpp CLOSED TREE 2022-06-24 22:01:02 +03:00
Cathy Lu 617487c8c7 Bug 1734394 - Make Geckoview use the session store collector r=geckoview-reviewers,agi,farre
When the session storage prefs are enabled, GeckoSession updateSessionState will provide the bundle of information, including zoom, scroll, and form data, to the delegate. Currently works for Fission and on Fenix.

Differential Revision: https://phabricator.services.mozilla.com/D148215
2022-06-24 18:34:28 +00:00
Marian-Vasile Laza 63b59e32d4 Backed out changeset 39559c43173a (bug 1734394) for causing bustages on GeckoBundleUtils.cpp. CLOSED TREE 2022-06-23 20:05:54 +03:00
Cathy Lu 4d149860a7 Bug 1734394 - Make Geckoview use the session store collector r=geckoview-reviewers,agi,farre
When the session storage prefs are enabled, GeckoSession updateSessionState will provide the bundle of information, including zoom, scroll, and form data, to the delegate. Currently works for Fission and on Fenix.

Differential Revision: https://phabricator.services.mozilla.com/D148215
2022-06-23 16:44:32 +00:00
Kagami Sascha Rosylight e9a92f2d27 Bug 1768189 - Part 30: Apply modernize-concat-nested-namespaces to dom/serviceworkers/ServiceWorkerUnregisterCallback.cpp ... r=andi
Depends on D145763

Differential Revision: https://phabricator.services.mozilla.com/D145764
2022-05-09 20:41:14 +00:00
Jan Varga 241900781d Bug 1688665 - Support for clearing sessionStorage by principal; r=pbz
The original patch D121639 has been developed by pbz.

Depends on D139812

Differential Revision: https://phabricator.services.mozilla.com/D139813
2022-03-22 07:12:21 +00:00
Andreas Farre cd96fe70a4 Bug 1711886 - Part 1: Store PrincipalInfo in SessionStorageCacheParent. r=asuth
By storing the PrincipalInfo in the parent copy it is possible to
query the BackgroundSessionStorageManager withouth the need of a
preprocessing step matching resulting data to principals using the
browsing context tree. Instead the result from the query contains the
principal info.

To be able to initialize the parent actor lazily with a principal
info, it was needed to make clearing the storage be a less fine
grained transaction. Instead of sending updates per cache, we after
clearing in the child process we send a message to the parent that in
turn performs the same steps.

Differential Revision: https://phabricator.services.mozilla.com/D125680
2021-09-22 15:42:46 +00:00
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
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
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
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
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
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 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 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
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 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
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 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
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
Tom Tung 45a97b5b83 Bug 1654080 - Use PBackground for syncing SessionStorageCache and use LSWriteOptimizer to send data changes; r=dom-workers-and-storage-reviewers,janv,nika
This patch does:
- Use LSWriteOptimizer
- Remove SessionStorageService since it's unused.
- Move IPC from PContent to PBackground
(by SessionStorageManager{Child, Parent} and SessionStorageCache{Child, Parent}).
- Extract SessionStorageManagerBase and add PBackgroundSessionStorageManager.
- Expose a getter function to get a BackgroundParentManager for top context id
on the parent.

IPC
- Before this patch:
  - Copy from parent while loading a document.
    - Mark cache entry on the parent process as loaded by the child id.
  - Update change on checkpoint.
  - Unmark cache entry on the parent process as unloaded for the child id while
  the parent actor is destorying.
- After this patch:
  - Sync IPC load in the first SessionStorage operation.
  - Update change on checkpoint

`BackgroundSessionStorageManager`'s lifecycle on the parent process.
- Create by `SessionStorageManagerParent` and register to the `sManagers`.
- Hold by `SessionStorageManagerParent` and `sManagers`.
- Remove from the `sManagers` while the corresponding `BrowsingContext` is
destructed (on the parent process).

Depends on D89341

Differential Revision: https://phabricator.services.mozilla.com/D89342
2020-10-14 00:19:33 +00:00
Tom Tung 31d8106531 Bug 1654080 - Sync SessionStorageCache to the parent process per write operation; r=dom-workers-and-storage-reviewers,janv
Before this change the session storage data was only synced when the content
process was shut down, and now it is done earlier & more often on every write
operation

Differential Revision: https://phabricator.services.mozilla.com/D89340
2020-09-23 15:22:58 +00:00
Simon Giesecke de7bab0f06 Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82325
2020-09-23 15:17:15 +00:00
Simon Giesecke e443211b53 Bug 1653229 - Remove unnecessary includes for BindingUtils.h. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D83771
2020-07-22 15:12:10 +00:00
Liang-Heng Chen 72da9842fb Bug 1629707 - use `StoragePrincipal` for `SessionStorage`; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D72765
2020-04-30 07:31:16 +00:00
Liang-Heng Chen ebc07b158d Bug 1629707 - make `SessionStorage` support `StoragePrincipal`; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D72764
2020-04-29 20:47:14 +00:00
Sebastian Streich 5577df21f9 Bug 1615297 - Move Localstorage Keygen into Principal r=ckerschb,baku
Differential Revision: https://phabricator.services.mozilla.com/D62757

--HG--
extra : moz-landing-system : lando
2020-03-29 15:31:24 +00:00
Daniel Varga 8edab673d8 Backed out changeset d15b968aa6d1 (bug 1615297) for causing build bustage
CLOSED TREE

--HG--
extra : rebase_source : 4e525e82fb7f194d9b7eac0020932ed09ac005b7
2020-03-11 05:41:51 +02:00
Sebastian Streich 1f23aca56c Bug 1615297 - Move Localstorage Keygen into Principal r=ckerschb,baku
Differential Revision: https://phabricator.services.mozilla.com/D62757

--HG--
extra : moz-landing-system : lando
2020-03-10 18:10:08 +00:00
Simon Giesecke b50347f917 Bug 1611415 - Prefer using std::move over forget. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-13 14:38:48 +00:00