Closed Bug 1810687 Opened 1 year ago Closed 1 year ago

Initial session data items are applied too many times on new modules

Categories

(Remote Protocol :: WebDriver BiDi, task, P1)

task
Points:
1

Tracking

(firefox111 fixed)

RESOLVED FIXED
111 Branch
Tracking Status
firefox111 --- fixed

People

(Reporter: jdescottes, Assigned: Sasha)

References

Details

(Whiteboard: [webdriver:m6])

Attachments

(1 file)

Spotted while cleaning up a message handler test for Bug 1806820, we apply initial session data items too many times: https://searchfox.org/mozilla-central/rev/d39a17381a14606032f7b8e82789bf281beb1241/remote/shared/messagehandler/WindowGlobalMessageHandler.sys.mjs#75-96

Here we create 1 promise per session data item, but we still pass all the session data items (plural) to each _applySessionData command. So if we have 3 session data items for the same category, new modules will attempt to "apply" all of them 3 times.

In theory there should be no observable issue for consumers here, because modules should safely ignore redundant session data items, but it's still unnecessary processing.

Note that _applySessionData should still be called once per session data item category, so here what we have to do is to group session data items per category, and then call _applySessionData only once per category.

Severity: -- → S3
Points: --- → 1
Priority: -- → P2
Whiteboard: [webdriver:backlog]
Assignee: nobody → aborovova
Status: NEW → ASSIGNED
Priority: P2 → P1
Whiteboard: [webdriver:backlog] → [webdriver:m6]
Pushed by aborovova@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a27a9ffc1cef
[messagehandler] Group SessionData initial updates by moduleName and category. r=webdriver-reviewers,jdescottes
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: