Re: [webrtc-pc] Section 4.3.1: operations queue and setDescription (#1277)

I think all issues reported here have been addressed by now, so we can close this issue.

> (operations queue)
This algorithm seems to imply that operation is run synchronously
if the queue depth is one (step 6) whereas if it's not, it's run
asynchronously.

This was discussed in https://github.com/w3c/webrtc-pc/pull/1397 and closed. Only an operation's chained preamble ever runs synchronously—matching how `async` functions work—so reentrancy shouldn't be an issue.

> `1. Let p be a new promise.`

The latest version of the [chain an operation](https://w3c.github.io/webrtc-pc/#dfn-chain-an-operation) algorithm returns a promise, which the outer steps return appropriately, so this should be fixed.

> `2. If elements of the SDP were modified, then reject p with InvalidModificationError`
> 
> This only applies to local decriptions.

Fixed. In [SLD](http://w3c.github.io/webrtc-pc/#dom-peerconnection-setlocaldescription) only now (see **[[LastCreatedOffer]]** and *[[LastCreatedAnswer]]**.

> `5. If the content of description is invalid, then reject p with a
newly created InvalidAccessError and abort these steps.`
> 
> What would invalid be here? Anything else?

This is when SDP is syntactically valid, but violates some SDP offer/answer or JSEP rule. E.g. direction in an answer is incompatible with what was in the offer, or changing a mid in an answer. Firefox [uses it](https://searchfox.org/mozilla-central/rev/b38e3beb658b80e1ed03e0fdf64d225bd4a40327/media/webrtc/signaling/src/jsep/JsepSessionImpl.cpp#697) FWIW.

> `2. If description is applied successfully, the user agent must
queue a task that ru ns the following steps:`

Queue a task gets us back to main thread.

-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/1277#issuecomment-517410498 using your GitHub account

Received on Thursday, 1 August 2019 18:44:16 UTC