Open Bug 1934326 Opened 3 months ago Updated 1 month ago

"waitForCurrentWindowGlobal()" should check for discarded browser to not unnecessarily wait for the window global

Categories

(Remote Protocol :: Agent, defect, P3)

defect
Points:
2

Tracking

(Not tracked)

People

(Reporter: whimboo, Unassigned)

References

(Depends on 1 open bug)

Details

(Whiteboard: [webdriver:m15])

As discovered by reviewing https://phabricator.services.mozilla.com/D230661 I noticed that we unnecessarily wait extra 100ms in waitForCurrentWindowGlobal() if the actual window was already closed. This can hopefully be easily fixed by checking if the browsing context is discarded - but note that this flag can be set to true as well if there is a cross-origin navigation. So we need to be careful.

When we can remove the 100ms delay we should also update the BiDi tests as added by https://phabricator.services.mozilla.com/D230663 so that they no longer have to delay by 250ms but just 100ms.

Depends on: 1932916
Depends on: 1935324

Due to the risk of regressions it would be good to wait landing any patch until the next cycle early next year with cycle.

Severity: -- → S3
Points: --- → 2
Priority: -- → P3
Whiteboard: [webdriver:m14]
Whiteboard: [webdriver:m14] → [webdriver:m15]

I just stumbled over the 250ms timeout in the perform actions wdspec tests while doing a review and thought about to give it a try. Given that I cannot reproduce locally I pushed a try build to get some debug information. Lets see if it still reproduces with MacOS 14.70.

https://treeherder.mozilla.org/jobs?repo=try&searchStr=platform%2Copt&revision=fe33b092ac8b36b49a3cf92a81fcc319b51705bc

You need to log in before you can comment on or make changes to this bug.