[wpt-sync] Sync PR 16350 - [PeerConnection] Fix crash: Old state information surfaced in SLD/SRD.
Categories
(Core :: WebRTC, defect, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox69 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 16350 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/16350
Details from upstream follow.
Henrik Boström <hbos@chromium.org> wrote:
[PeerConnection] Fix crash: Old state information surfaced in SLD/SRD.
Because of WebRTC's blocking-invoke threading model, the order of events
are not always the same in the content and webrtc layers, causing bugs
in some edge-cases.For example, addTrack() and setLocalDescription() both modify the set
of transceivers. addTrack() does so with a blocking-invoke, and SLD()
does so asynchronously, where the state change is surfaced in a
callback.In rare cases, it is possible for addTrack() to modify the sender's
track and then for a setLocalDescription() callback carrying outdated
transceiver state information to null the track. And similarly this
could happen reverting changes to the transceiver's direction.This makes the content layer not reflect the webrtc layer, which in
the referenced bug even causes a crash because a track adapter no
longer exists.The fix is not to update "transceiver.sender.track" or
"transceiver.direction" in SLD/SRD callbacks for transceivers that
already exists. This is valid, because these fields can only be
modified by other APIs (addTrack, replaceTrack, direction, etc) and
not by SDP.Bug: 950280
Change-Id: Icdcc65c5f8b5861550bda588597b88f6103c4f70
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1566346
Commit-Queue: Henrik Boström \<hbos@chromium.org>
Reviewed-by: Guido Urdaneta \<guidou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#651234}
| Assignee | ||
Updated•7 years ago
|
| Assignee | ||
Updated•7 years ago
|
| Assignee | ||
Updated•7 years ago
|
| Assignee | ||
Comment 1•7 years ago
|
||
| Assignee | ||
Comment 2•7 years ago
|
||
| Assignee | ||
Comment 3•7 years ago
|
||
Comment 5•7 years ago
|
||
| bugherder | ||
Description
•