Closed Bug 1971512 Opened 1 year ago Closed 11 months ago

Replace usage of "TimedPromise" with a simple timer in AnimationFramePromise

Categories

(Remote Protocol :: Agent, task, P2)

task
Points:
2

Tracking

(firefox140 fixed, firefox141 fixed)

RESOLVED FIXED
141 Branch
Tracking Status
firefox140 --- fixed
firefox141 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

Details

(Whiteboard: [webdriver:m16])

Attachments

(2 files)

On bug 1947402 the AnimationFramePromise got refactored to allow to escape as well after a given amount of seconds. Therefore the TimedPromise was used to allow an early abort via Promise.race.

As it looks like the usage of the TimedPromise caused a regression because it cannot be canceled when requestAnimationFrame was called or the window was closed or put into BFCache. As such a warning log entry is done causing confusion when observing WebDriver logs or even failing tests that rely on specific log output.

I would suggest that we use a basic timer from the Timer.sys.mjs module instead for the AnimationFramePromise. That way we have a timer id that we can cancel once Promise.race was resolved.

This is causing a higher failure rate for Thunderbird so putting it into the m16 milestone.

Points: --- → 2
Priority: -- → P2
Whiteboard: [webdriver:m16]
Pushed by hskupin@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/b20068e69ed4 https://hg.mozilla.org/integration/autoland/rev/363c445425ce [remote] Replace usage of "TimedPromise" with a simple timer in AnimationFramePromise. r=webdriver-reviewers,jdescottes
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → 141 Branch
Attachment #9494536 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined: Only affects automation with Webdriver causing extra logs and potential xpcshell test failures
  • Code covered by automated testing: yes
  • Fix verified in Nightly: yes
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: none
  • Risk associated with taking this patch: low
  • Explanation of risk level: Replaces a custom timer promise with a plain timer promise
  • String changes made/needed: none
  • Is Android affected?: yes
Attachment #9494536 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: