• Henrik Boström's avatar
    Fix crash: add/remove track on an addStream()-stream after pc.close(). · fa714c67
    Henrik Boström authored
    MediaStreams added to an RTCPeerConnection using the legacy addStream()
    API is wired up such that the RTCPeerConnection is informed when tracks
    are added or removed from the MediaStream so that the corresponding
    sender can be added/removed from the PC.
    
    OnStreamAddTrack/OnStreamRemoveTrack was wired up to call addTrack() and
    removeTrack(), the crash occurred if these operations were to throw an
    exception even though we just want to suppress any exceptions thrown.
    The ExceptionState is updated to allow an exception to be thrown before
    being cleared. This fixes the referenced bug.
    
    Bug: 814139
    Change-Id: I7798d7cf43bb71d42b7b8108f40ffba36dc95946
    Reviewed-on: https://chromium-review.googlesource.com/992321Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
    Commit-Queue: Henrik Boström <hbos@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#547754}
    fa714c67
RTCPeerConnection-legacy-stream-APIs.html 8.11 KB