-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add steps to createOffer and explicitly specify what is queued #745
Conversation
45c3d1b
to
6567975
Compare
<li> | ||
<p>If <var>connection</var>'s [[<a>isClosed</a>]] slot | ||
is <code>true</code>, return a promise rejected with an | ||
<code>InvalidStateError</code>.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move the isClosed
test up so it is not enqueued. We want to return an already rejected promise to JS on input and state validation (so they're immediately observable as rejected in JS debuggers, like we did for mediacapture). We suppress rejections past close.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean we suppress rejections from enqueued actions past close.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This text is in line with the queued steps of addIceCandidate, but I think what you're saying makes sense. So we check for closed state right away, and then make sure that nothing is taken of the queue if the isClosed slot is true.
Lgtm once |
I've moved the rejection of closed state into the sync part of the queueing steps so it can be reused by all queued operations. I've also added checks into the queuing algorithm that checks if the isClosed flag is set before advancing (e.g. taking the next operation off the queue). @jan-ivar, please review (especially the third commit). |
<p>Reject <var>p</var> with a | ||
<code>DOMException</code> object whose | ||
<code>name</code> attribute has the value | ||
<code>OperationError</code> and, abort these |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comma in wrong place, though I just noticed this isn't an if-statement, and there are no more steps, so can we simply remove ", and abort these steps?"
Lgtm with nits. |
produce an identity assertion, reject | ||
<var>p</var> with a <code>DOMException</code> | ||
object whose <code>name</code> attribute has | ||
the value <code>NotReadableError</code>, and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to get more information about what went wrong
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. We might want to create a separate issue on that.
387784b
to
0ffe6a2
Compare
Rebased on top of commit that patches the JSEP reference system. Also updated a JSEP reference that previously wasn't working. I think this is ready to be merged now. |
Fixes #744
This PR is currently based on PR #721 to make use of some changes to the generic queued operation section.