Re: [webrtc-pc] Race condition in enqueue an operation

Let's actually examine what the synchronous steps we're talking about are:

1. Checking if `remoteDescription` is `null` in `createAnswer` and `addIceCandidate`.
2. Checking if an ICE candidate's `sdpMid`/`sdpMLineIndex` are non-null.
3. Checking that an ICE candidate's `sdpMid` matches an "m=" section.

I don't think these are errors you'd need a debugger to help figure out; they're pretty obvious.

But on the other hand, I also don't see any race conditions these steps could introduce; they're dependent only on the results of other enqueued operations. So the only possible race is with `pc.close()`, as pointed out at the top of this issue. Which is probably not worth fixing.

So, although I don't see the point of the "execute immediately if queue is empty" rule, it doesn't seem to really be hurting anything.

-- 
GitHub Notification of comment by taylor-b
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/1218#issuecomment-310991892 using your GitHub account

Received on Monday, 26 June 2017 08:11:04 UTC