Closed Bug 1788659 Opened 2 years ago Closed 6 months ago

Implement "script.realmDestroyed" event

Categories

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

task
Points:
5

Tracking

(firefox119 fixed)

RESOLVED FIXED
119 Branch
Tracking Status
firefox119 --- fixed

People

(Reporter: whimboo, Assigned: Sasha)

References

()

Details

(Whiteboard: [webdriver:m8][wptsync upstream][webdriver:relnote])

Attachments

(2 files)

This event is needed for clients to handle situations when realms are getting destroyed / removed, eg. closing a frame or tab.

Blocks: 1788894

So generally there is no command yet which allows to destroy a specific existent realm. That means realms will be only destroyed when the window object itself gets removed. Hereby I was first thinking about a possible event that we should register for, but we most likely can just rely on the destructor logic of the message handler framework.

That means when the module cache is destroyed it will call destroy() for each module. When the script module removes all the realms we should be able to fire individual events for each of the realms. My hope here is that the event can still be sent to the parent process.

Priority: -- → P2
Whiteboard: [webdriver:backlog]
No longer blocks: 1788894
Depends on: 1788894
Assignee: nobody → aborovova
Status: NEW → ASSIGNED
Priority: P2 → P1
Whiteboard: [webdriver:backlog] → [webdriver:m8]
Points: --- → 5
Pushed by aborovova@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d966f217dd1c
[bidi] Implement "script.realmDestroyed" event. r=webdriver-reviewers,jdescottes
https://hg.mozilla.org/integration/autoland/rev/5b6b792e8a29
[wdspec] Add tests for "script.realmDestroyed" event. r=webdriver-reviewers,jdescottes
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/41938 for changes under testing/web-platform/tests
Whiteboard: [webdriver:m8] → [webdriver:m8], [wptsync upstream]
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 119 Branch
Upstream PR merged by moz-wptsync-bot
Whiteboard: [webdriver:m8], [wptsync upstream] → [webdriver:m8][wptsync upstream][webdriver:relnote]
You need to log in before you can comment on or make changes to this bug.