This was the last resource type requiring to keep the old storage actor as-is.
This will help drastically simplify it and move storage type code into each Resource Watcher class.
Differential Revision: https://phabricator.services.mozilla.com/D166661
We need the string in devtools/shared `naturalOrder`, but we can't directly retrieve
it from the fluent file as it lives on the client (and won't be available in the
server on Android).
As the client and server might have different locales, we can't move the string
to devtools/shared.
Since the function is used from the server to make sure the data is displayed
properly on the UI, we pass the localized string to `getStoreObjects` so it's
then available to `naturalOrder`.
Tests are updated to match the new signature.
Differential Revision: https://phabricator.services.mozilla.com/D164354
Everywhere but:
* the debugger (to be done independently)
* jsonview (uses custom resource:// URLs)
* dependencies of jsonview in client/shared (reps, react, and two components)
* one dependency of performance-new (fluent-react)
This will greatly help migrating to ES Modules which don't support path and only URLs or relatives.
Differential Revision: https://phabricator.services.mozilla.com/D158324
Both the dtd and properties files strings are moved to the existing storage.ftl.
A migration file was added to keep the localized strings.
Some of the strings were migrated to a declarative approach, setting `data-l10n-id` and
`data-l10n-args` attributes on elements. But in other cases, this was not easily doable.
To accomodate with the asynchronicity of `formatValue`, we translate all the strings that
don't have dynamic parameters during the initialization of the panel, and store them in
a Map for easy retrieval.
We also took this opportunity to cleanup the strings key names and have them all prefixed
with `storage-*`. Some functions where refactored so it should be easier to search the
code for a specific l10n string.
Finally, the `table.headers.indexedDB.*` strings weren't migrated as they were never read
in the UI (they are referenced in `NON_L10N_STRINGS`, which bypass localization).
Differential Revision: https://phabricator.services.mozilla.com/D143012
In the ParentProcessStorage class, we are listening for window-global-created/destroyed
event to notify the client that hosts can be added/removed.
But in case of bfcache navigation, those events are not emitted.
In order to fix this issue, we forward pageshow and pagehide events from the
DevToolsFrameChild to the DevToolsFrameParent, where the watcher actor can emit
those events, which we'll be listened to by the ParentProcessStorage.
Test cases are added to ensure this works as expected.
Differential Revision: https://phabricator.services.mozilla.com/D118325
This adds support for server target-switching for parent process storage resources (cookies and indexedDB at the moment)
Differential Revision: https://phabricator.services.mozilla.com/D114600
This adds a resource for the cookie storage type, that supports inspecting iframes, etc. on Fission.
NOTE: in order to use this new resource, set the `devtools.testing.enableServerWatcherSupport` to `true`
Differential Revision: https://phabricator.services.mozilla.com/D108040
This adds a resource for the cookie storage type, that supports inspecting iframes, etc. on Fission.
NOTE: in order to use this new resource, set the `devtools.testing.enableServerWatcherSupport` to `true`
Differential Revision: https://phabricator.services.mozilla.com/D108040
* onResourceListAvailable and populateStorageTree were both computing distinct dictinary. `storages` versus `this.storageResources` (with the resourcesWithHosts making them both differents). It is easier to follow if we have only one dictionary, build by onResourceListAvailable and that's the straight object given by the ResourceWatcher API.
* Since we migrated to resources API. `resources` object passed to onResourceAvailable
should no longer have any `from` attribute. This is no longer a RDP packet, but an array computed by the ResourceWatcher API.
* This isn't really useful to filter out resources with empty `hosts` because `populateTreeFromResource` will be a noop
if that's empty. I think it is easier to follow if we pass all the resources to this method.
Differential Revision: https://phabricator.services.mozilla.com/D105646
This variable name was confusing and didn't help understand the great complexity of this object.
This is a dictionary of storage resources, which also happen to be fronts, keyed by storage type/key (string).
Differential Revision: https://phabricator.services.mozilla.com/D105645
Resource updates and destroyed were ignored because the singleton storage resource
was cleaned on will-navigate.
So, we instead revert back to listen to events on fronts.
But instead of listening to a unique event on storageFront,
we listen to each individual storage resource front (one per type and per target).
This is why we have to do some filtering, still. Both on legacy listener and Watcher classes.
I'm also clarfifying things a bit in ContentProcessStorageWatcher,
I forked StorageActor completely, while removing its protocol.js Actor inheritance
and some stuff that we don't need for the Watcher class.
This help emitting stores-updated and stores-cleared and reuse the exact same
code between legacy listener and watcher class regarding filtering.
Differential Revision: https://phabricator.services.mozilla.com/D104687
Traits support was added to the storage actor in FF80.
Firefox release is now FF81 so we can cleanup the related backward compatibility code.
Differential Revision: https://phabricator.services.mozilla.com/D93081
This is D86050, rebased on top of current central. I kept it a separate commit, so the new stuff can be reviewed separately in a different revision.
Differential Revision: https://phabricator.services.mozilla.com/D91122
Depends on D84689
The test failures are coming from a race condition which became visible with the previous patch in the stack.
The storage inspector head.js waits for an event emitted by the UI when opening the panel.
But now that we don't have to wait for the 4 actorHasMethod calls, the event is emitted before the test can listen for it.
One option is to let onTargetAvailable wait for the event instead, so that the Storage panel is only initialized when the store-objects-updated was fired.
This way, the test harness no longer has to wait for this event.
Differential Revision: https://phabricator.services.mozilla.com/D84788
This is the only meaningful callsite for actorHasMethod.
This method has many bugs and we want to replace it with traits
Differential Revision: https://phabricator.services.mozilla.com/D84689
Since targetFronts now have isTopLevel and targetType properties, we can directly use
those, as the targetFront is included in the callback parameter.
This patch remove those properties and refactor consumer code.
Differential Revision: https://phabricator.services.mozilla.com/D74651
Since targetFronts now have isTopLevel and targetType properties, we can directly use
those, as the targetFront is included in the callback parameter.
This patch remove those properties and refactor consumer code.
Differential Revision: https://phabricator.services.mozilla.com/D74651