[Perfect Negotiation] Surface session descriptions at the right time.
This fixes another timing related issue that blocks Perfect Negotiation. Before this CL, current/pending local/remote description attributes do blocking-invokes on the webrtc thread, fetching the most up-to-date states. This can prematurely expose the result of "in-parallel" operations that have not surfaced yet, such as: - setLocalDescription - setRemoteDescription - addIceCandidate This CL fixes that by copying the SDP states when any of these operations complete on the WebRTC thread and carry them over in the PostTask to the main thread. Here, we store these snapshots in "internal slots" (variables living on the main thread). With this CL, reading SDP attributes from RTCPeerConnection is non-blocking and spec-compliant. WPT test coverage added for the exact timing of SLD/SRD and other test expectations are updated. addIceCandidate updating the SDP is already covered by old WPTs. Bug: chromium:1110347 Change-Id: Id41ec354465525c6cedf631fe2209fe097148f60 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2323359 Commit-Queue: Henrik Boström <hbos@chromium.org> Reviewed-by:Harald Alvestrand <hta@chromium.org> Cr-Commit-Position: refs/heads/master@{#801798}
Showing
This diff is collapsed.
Please register or sign in to comment