Closed Bug 1937118 Opened 2 months ago Closed 2 months ago

AnimationFramePromise hangs when window gets navigated

Categories

(Remote Protocol :: Agent, defect, P2)

defect
Points:
3

Tracking

(firefox135 fixed)

RESOLVED FIXED
135 Branch
Tracking Status
firefox135 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

Details

(Whiteboard: [webdriver:m14][webdriver:relnote])

Attachments

(1 file)

Noticed while investigating the issue over on bug 1936804. In our input.performActions implementation for WebDriver BiDi we use the AnimationFramePromise in the content process. This worked fine so far but when an action actually triggers a navigation of the current navigable the formerly registered callback for requestAnimationFrame will no longer be called because the window gets replaced.

Instead of checking window.close only we should switch to EventPromise and wait for the unload event of the window to escape and not hang forever.

The changes that I'm going to upload soon will fix the problem on bug 1936804 for nofis and nofis-ship jobs that we run by default in CI now.

This patch modifies the AnimationFramePromise function to use
an unload event listener for aborting the promise instead of
repeatedly polling win.closed.

This approach simplifies the logic, avoids reliance on polling,
and fixes a hang issue that occurred when the window was navigated.

Severity: -- → S3
Points: --- → 3
Priority: -- → P2
Whiteboard: [webdriver:m14]
Attachment #9443478 - Attachment description: Bug 1937118 - [remote] Replace window.closed check with unload event in AnimationFramePromise. → Bug 1937118 - [remote] Replace window.closed check with "pagehide" event in AnimationFramePromise.
Pushed by hskupin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/584a4cf92e9c [remote] Replace window.closed check with "pagehide" event in AnimationFramePromise. r=webdriver-reviewers,Sasha
Blocks: 1937745
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 135 Branch
Blocks: 1871346
Whiteboard: [webdriver:m14] → [webdriver:m14][webdriver:relnote]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: