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

22 Коммитов

Автор SHA1 Сообщение Дата
Jan Varga 67c1136dd9 Bug 1556217 - LSNG: Add a test for large items; r=asuth, smaug
Differential Revision: https://phabricator.services.mozilla.com/D33417
2019-06-02 08:00:25 +02:00
Jan Varga 65f92e054f Bug 1552428 - LSNG: Datastore::PrivateBrowsingClear uses wrong delta for usage updating; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D31605
2019-05-17 10:30:19 +02:00
Razvan Maries 7afbe4a8bf Backed out changeset 01dd2842bbaa (bug 1552428) for ES Lint failure. CLOSED TREE 2019-05-31 18:07:15 +03:00
Jan Varga 673d464ca1 Bug 1552428 - LSNG: Datastore::PrivateBrowsingClear uses wrong delta for usage updating; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D31605
2019-05-17 10:30:19 +02:00
Jan Varga a74b30fb4c Bug 1546723 - Part 1: Convert WriterOptimizer to a generic reusable class; r=asuth
This patch creates a new generic class LSWriteOptimizer which can be used with any value type for specific write optimizations either on the parent side or the child side.

Differential Revision: https://phabricator.services.mozilla.com/D31196
2019-05-15 06:11:10 +02:00
Jan Varga 2ffbce35b7 Bug 1513937 - LSNG: Compress specific values; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D29140
2019-04-29 06:10:42 +02:00
Jan Varga d3494ff018 Bug 1547454 - LSNG: Create a new C++ class for local storage values; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D29138
2019-04-29 06:05:56 +02:00
Ryan VanderMeulen 4f044a29d2 Backed out 8 changesets (bug 1513937, bug 1546310, bug 1548788, bug 1547688, bug 1547452, bug 1540777, bug 1542669, bug 1547454) for causing bug 1549362.
Backed out changeset 8dca7df29492 (bug 1548788)
Backed out changeset 688f361e8bb6 (bug 1547688)
Backed out changeset b5d8d57838a3 (bug 1540777)
Backed out changeset d1bd31177b14 (bug 1513937)
Backed out changeset df97dfbb526a (bug 1546310)
Backed out changeset ade08d6dc361 (bug 1547454)
Backed out changeset b622431054b7 (bug 1547452)
Backed out changeset ad73e5604411 (bug 1542669)
2019-05-06 09:02:54 -04:00
Jan Varga 12fd20045f Bug 1513937 - LSNG: Compress specific values; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D29140
2019-04-29 06:10:42 +02:00
Jan Varga f482d3216d Bug 1547454 - LSNG: Create a new C++ class for local storage values; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D29138
2019-04-29 06:05:56 +02:00
Sebastian Hengst 78d58dd656 Bug 1535619 - add meta information to create bugs for files in dom/localstorage/ in 'Core :: DOM: Web Storage' r=janv
Differential Revision: https://phabricator.services.mozilla.com/D23670

--HG--
extra : moz-landing-system : lando
2019-03-15 14:01:58 +00:00
Jan Varga 62cb092a89 Bug 1526615 - Part 2: Implement GenerateOriginKey2 which can be used on any thread; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D19283
2019-02-10 10:20:12 +01:00
Jan Varga 4220031bba Bug 1286798 - Part 51: Add tests for archive and shadow database clearing; r=asuth 2018-11-29 21:49:58 +01:00
Jan Varga 5809f14bbd Bug 1286798 - Part 36: Allow snapshot initialization to a specific load state; r=asuth
Before this patch, it was only possible to initialize a snapshot to the Partial state or AllOrderedItems state. Now there's a third state AllOrderedKeys.
This improves performance by eliminating sync calls to parent process when we know nothing about a key in content process (in that case we have to use a sync call to the parent process to see if there's a value for it).
With this patch we always try to send all keys to content when a snapshot is being initialized. For this to work efficiently, we cache the size of all keys.
Having cached size of all keys also allows us to just iterate the mValues hashtable when the size of keys is bigger than snapshot prefill threshold (instead of iterating over the mKeys array and joining with mValues for each particular key).
There's some additional cleanup in snapshot info construction and Datastore::SetItem/RemoveItem/Clear methods.
2018-11-29 21:49:10 +01:00
Jan Varga c4f55013cf Bug 1286798 - Part 29: Implement implicit snapshotting of databases; r=asuth,mccr8
This improves performance a lot in cases when multiple operations are invoked by a single JS function (number of sync IPC calls is reduced to a minimum). It also improves correctness since changes are not visible to other content processes until a JS function finishes.
The patch implements core infrastructure, all items are sent to content when a snapshot is initialized and everything is fully working. However, sending of all items at once is not optimal for bigger databases. Support for lazy loading of items is implemented in a following patch.
2018-11-29 21:48:47 +01:00
Jan Varga 1812608353 Bug 1286798 - Part 27: Share database actors; r=asuth
If a database actor already exists for given origin, reuse it instead of creating a new one. This improves memory footprint a bit and also eliminates some round trips to the parent process.
2018-11-29 21:48:41 +01:00
Jan Varga 7981be440b Bug 1286798 - Part 25: Add checks for the group and global limit; r=asuth 2018-11-29 21:48:34 +01:00
Jan Varga 81c542fbe6 Bug 1286798 - Part 19: Implement a helper method for datastore preloading verification; r=asuth
A new type of request is introduced, PBackgroundLSSimpleRequest. This protocol is much simpler than PBackgroundLSRequest which needs to be cancelable.
2018-11-29 21:48:15 +01:00
Jan Varga 9bbba97e91 Bug 1286798 - Part 11: Enable tests for session only mode (but only for the old local storage implementation); r=asuth
An attribute for checking if the next gen local storage implementation is enabled is exposed via a new interface nsILocalStorageManager which should be used for any other local storage specific stuff.
2018-11-29 21:47:48 +01:00
Jan Varga be167c5e0b Bug 1286798 - Part 10: Support for storage events; r=asuth,janv
Storage events are fired either directly after getting response from synchronous SetItem call or through observers. When a new onstorage event listener is added, we sycnhronously register an observer in the parent process. There's always only one observer actor per content process.
PBackgroundLSDatabase is now managed by a new PBackgroundLSObject protocol. PBackgroundLSObject is needed to eliminate the need to pass the principal info and document URI everytime a write operation occurs.
Preparation of an observer shares some states with preparation of a datastore, so common stuff now lives in LSRequestBase and preparation of a datastore now implements a nested state machine.

This patch was enhanced by asuth to drop observers only when the last storage listener is removed.
EventListenerRemoved is invoked on any removal, not just the final removal, so we need to make sure it's the final removal before dropping observer.
2018-11-29 21:47:45 +01:00
Jan Varga c5676a58c7 Bug 1286798 - Part 5: More integration with QuotaManager; r=asuth
Preparation of datastores now creates real database files on disk. The LocalStorage directory is protected by a directory lock.
Infrastructure for database schema upgrades is in place too.
Database actors are now explicitely tracked by the datastore. When the last actor finishes the directory lock is released.
Added also implementation for QuotaClient::GetUsageForOrigin() and QuotaClient::AbortOperations().
2018-11-29 21:47:27 +01:00
Jan Varga 60831f2e38 Bug 1286798 - Part 3: New basic (memory only) implementation of LocalStorage; r=asuth,mccr8
The implementation is based on a cache (datastore) living in the parent process and sync IPC calls initiated from content processes.
IPC communication is done using per principal/origin database actors which connect to the datastore.
The synchronous blocking of the main thread is done by creating a nested event target and spinning the event loop.
2018-11-29 21:47:20 +01:00