[webrtc-pc] "set an RTCSessionDescription" steps need to be broken up into multiple smaller lists of steps

taylor-b has just created a new issue for https://github.com/w3c/webrtc-pc:

== "set an RTCSessionDescription" steps need to be broken up into multiple smaller lists of steps ==
If writing code, it's a good rule of thumb to break code out into a new function once you encounter ~3 levels of nesting. Well, in the "set an RTCSessionDescription" steps, we're up to 6 levels of nesting. So I think it's time to do something.

I'd suggest breaking up the steps into different categories of attributes/objects that need to be updated. For example:

* Signaling state
* Current/pending descriptions
* SCTP transport and data channels
* Transceivers
* Track events
* DTLS/ICE transports

Each of these categories would have its own lists of steps. The main list of steps would then, for the most part, just point to these other lists of steps. Thoughts?

Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/1624 using your GitHub account

Received on Tuesday, 10 October 2017 02:59:57 UTC