Fix possible crash TransceiverStateSurfacer::Initialize() crash.
It may be possible that a peer connection is closed, garbage collected and that any local track adapters associated with it is destroyed before the setLocalDescription/setRemoteDescription observer callback is invoked on the signaling thread due to webrtc::PeerConnection invoking the observer with an asynchronous delay. TransceiverStateSurfacer::Initialize() will crash if local track adapters are missing. This CL makes WebRtcSet[Local/Remote]DescriptionObserverHandler not surface any transceivers if the webrtc-layer peer connection is closed. This should be fine, because the spec says to abort the SLD/SRD steps if the PC has been closed. This is a speculative fix for https://crbug.com/897251. The stack trace produced by the new unittest before the fix is the same as that bug, but the cause of the referenced bug being that the PC was closed and GC'd, as assumed by this CL, has not been confirmed. NOTE: This CL contains just the fix. https://chromium-review.googlesource.com/c/chromium/src/+/1309792 contains tests too but we broke up the CL to allow this to land before a dependent testing related CL lands. TBR=guidou@chromium.org Bug: 897251 Change-Id: Ibf621c45fd5a683d847596edeea1f88018783289 Reviewed-on: https://chromium-review.googlesource.com/c/1311919Reviewed-by:Henrik Boström <hbos@chromium.org> Commit-Queue: Henrik Boström <hbos@chromium.org> Cr-Commit-Position: refs/heads/master@{#604548}
Showing
Please register or sign in to comment