Modify WebRTC logic for disabling throttling.
Currently the existence of an RTCPeerConnection in a LocalDOMWindow prevents that context from being throttled. RTCPeerConnection objects are used in fingerprinting libraries (typically for the IP information that the ICE exploration yields), but not subsequently actually used to send any data. This prevents these contexts from being throttled. It has been observed that these same fingerprinting libraries add RTCDataChannels to the RTCPeerConnection, and these channels stay forever in the 'connecting' state and never transition to 'open'. To allow the context to be throttled this CL modifies the logic to only notify the scheduler once the RTCPeerConnection is supplemented with an 'open' RTCDataChannel or a 'live' MediaStreamTrack, which indicates with much higher likelihood that actual data will be sent. The feature handle is removed when RTCDataChannel or MediaStreamTrack transition to readyState == 'closed'. BUG=1127481,1075553,1101731 Change-Id: I9d07992da717a9e36eb004a7af27c4b72f9ea08c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2406685Reviewed-by:Harald Alvestrand <hta@chromium.org> Reviewed-by:
Sami Kyöstilä <skyostil@chromium.org> Reviewed-by:
François Doray <fdoray@chromium.org> Reviewed-by:
Guido Urdaneta <guidou@chromium.org> Commit-Queue: Chris Hamilton <chrisha@chromium.org> Cr-Commit-Position: refs/heads/master@{#808416}
Showing
Please register or sign in to comment