mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 07:13:20 +00:00
Bug 1839964 - Call waitForRoundTrip()
to make sure evaluatePromiseJS
has set up the given JS. r=botond,geckoview-reviewers,m_kato
There's a race in between a call of `evaluatePromiseJS` and a call of `flushApzRepaints` which is similar to bug 1743857. If the given JS for the `evaluatePromiseJS` call returns a Promise and if the call site doesn't wait for the Promise, we can't ensure the given JS has set up in the content. Unforutnately there's no good way to avoid the race, adding `waitForRoundTrip` seems to work. Differential Revision: https://phabricator.services.mozilla.com/D182439
This commit is contained in:
parent
3d156124fd
commit
7118a0eee6
@ -440,6 +440,10 @@ class InputResultDetailTest : BaseSessionTest() {
|
||||
""".trimIndent(),
|
||||
)
|
||||
|
||||
// Explicitly call `waitForRoundTrip()` to make sure the above event listners
|
||||
// have set up in the content.
|
||||
mainSession.waitForRoundTrip()
|
||||
|
||||
mainSession.flushApzRepaints()
|
||||
|
||||
val downTime = SystemClock.uptimeMillis()
|
||||
|
Loading…
Reference in New Issue
Block a user