Hang in IdlePromise if underlying window gets closed
Categories
(Remote Protocol :: Marionette, defect, P3)
Tracking
(firefox-esr68 unaffected, firefox75 wontfix, firefox76 wontfix, firefox77 fixed)
Tracking | Status | |
---|---|---|
firefox-esr68 | --- | unaffected |
firefox75 | --- | wontfix |
firefox76 | --- | wontfix |
firefox77 | --- | fixed |
People
(Reporter: kovalev007, Assigned: whimboo)
References
(Regression)
Details
(Keywords: regression)
Attachments
(4 files)
Testcase:
https://output.jsbin.com/fesusoj
- click on button with text "open"
- wait new window opened
- click on button with text "close"
- accept user promt
- wait new window closed
Actual results: geckodriver hung after accept user promt
Reporter | ||
Comment 1•5 years ago
|
||
Reporter | ||
Comment 2•5 years ago
|
||
Reporter | ||
Comment 3•5 years ago
|
||
Information from mozregression:
Last good revision: 09614cb3a896ab3be71ccc44d7663eb5454cf5cf
First bad revision: 4651b31ffe5c012b5112fc3047c29d0d4a8f9594
Pushlog: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=09614cb3a896ab3be71ccc44d7663eb5454cf5cf&tochange=4651b31ffe5c012b5112fc3047c29d0d4a8f9594
Reporter | ||
Comment 4•5 years ago
|
||
Assignee | ||
Comment 5•5 years ago
|
||
To summarize, this is a hang in IdlePromise
when the underlying window as operated on to wait for a requestAnimationFrame gets closed. This can happen at any time by random Javascript in the page.
To circumvent that we should add a listener or another Promise in IdlePromise
for the unload
event, and cancel the active requestAnimationFrame
Promise, which will actually never happen.
Updated•5 years ago
|
Assignee | ||
Comment 6•5 years ago
|
||
So here again a link to our IdlePromise
implementation:
https://searchfox.org/mozilla-release/rev/00bea92f25c9edc8022593e9d9435210e8306047/testing/marionette/sync.js#334-340
I wonder if it is really necessary to also wait for requestAnimationFrame
or if it is enough to just have the idleDispatchToMainThread
in there.
Florian, do you have any feedback for us here or maybe know someone who can give that? Thanks.
Comment 7•5 years ago
|
||
It's not clear to me what the IdlePromise callers expect it to do. If it's just to delay execution until the runnables already in the event queue have been processed, Services.tm.dispatchToMainThread would be enough, without waiting for and idle slice. If it's intended to wait for the window minimize/maximize/resize animations to be finished, then the current idle+requestAnimationFrame isn't waiting enough. Sorry that this doesn't really answer your question.
Assignee | ||
Comment 8•5 years ago
|
||
Thanks! I see, so I will have a patch which keeps that behavior and we could re-evaluate the usage of requestAnimationFrame
at a later time if needed.
Assignee | ||
Comment 9•5 years ago
|
||
Updated•5 years ago
|
Assignee | ||
Comment 10•5 years ago
|
||
George, can you please check if that patch works for you?
Comment 11•5 years ago
|
||
Comment 12•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Updated•2 years ago
|
Description
•