Closed Bug 1861943 Opened 1 year ago Closed 1 year ago

Introduce a server side method to set all data entry values in one call

Categories

(DevTools :: Framework, task)

task

Tracking

(firefox121 fixed)

RESOLVED FIXED
121 Branch
Tracking Status
firefox121 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

Details

Attachments

(1 file)

For now, the Watcher Actor only supports addDataEntry and removeDataEntry.
This only allows to either add some data entries, or, only remove some.

On top of that removeDataEntry is synchronous and doesn't wait for processing of the message in the target contexts. This is using synchronous sendAsyncMessage as it is used during the shutdown process of the targets and there is no guarantee that this will be completed.

Bug 1569775 would benefit from making BreakpointListActor.setActiveEventBreakpoints:
https://searchfox.org/mozilla-central/rev/aa8a99510c0686cdf9d42fb4b8f6d968884c961d/devtools/server/actors/breakpoint-list.js#79-91
only resolve once all the breakpoints are fully updated.
But because of removeDataEntry being synchronous, there is no guarantee of the request to be fully processed in the content processes. This may cause intermittent in tests.
Also, it would prevent having to distinguish the added and removed breakpoints ID if we were having a "set all entries" method, that instead of only "add" and "remove".

Bug 1651522 would also benefit from having a "set all entries" method for the new upcoming "host" data entry, which is made of only a unique string value.

Type: enhancement → task

This will help bug 1569775 and bug 1651522 to update the whole entries of a given data type.

As there is little difference between adding new entries and replacing all entries,
I'm tuning the existing addSessionDataEntry methods to support both behaviors.

Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b6679860acd1 [devtools] Introduce a server side method to set all data entry values in one call. r=devtools-reviewers,nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 121 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: