Closed Bug 1600824 Opened 4 years ago Closed 4 years ago

PeerConnnection's operations chain should run synchronous parts of operations synchronously.

Categories

(Core :: WebRTC: Signaling, defect, P2)

Unspecified
All
defect

Tracking

()

RESOLVED FIXED
mozilla75
Tracking Status
firefox75 --- fixed

People

(Reporter: jib, Assigned: jib)

References

Details

Attachments

(2 files)

The way our peer connection operations chain works is a bit unfortunate, always awaiting a promise, causing code that according to spec should run synchronously to run on the microtask queue. Also, a few up-front uses of Promise.all cause the same thing.

Probably not a big difference, since it's still in the same run of the event loop. But it's JS observable to some extent, so I think we can fix this up a bit.

I ran into this while trying to write an isOperationsChainEmpty() detector to help write some wpt tests to investigate some timing issues in Chrome.

Am adding those tests here as well.

Assignee: nobody → jib
Priority: -- → P3

Any idea what might be happening here?

Flags: needinfo?(docfaraday)

Maybe you're tripping over bug 1591199 here (because the signalingstatechange event fires at the wrong time)?

Flags: needinfo?(docfaraday)
Depends on: 1591199
Priority: P3 → P2
Pushed by jbruaroey@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ee9a06cf6483
Fix operations queue to run 1st operation synchronously. r=bwc
https://hg.mozilla.org/integration/autoland/rev/d02d1c8a0b5c
Fix racy test_peerConnection_setLocalOfferInHaveRemoteOffer.html r=bwc
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/22029 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Pushed by csabou@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/99bd31409968
Update expectation for RTCPeerConnection-operations.https.html. a=test-only
Upstream PR merged by moz-wptsync-bot
Regressions: 1620844
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: