Skip to content

Commit

Permalink
Prevent GC of non-closed RTCDataChannels
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-ivar committed Oct 6, 2023
1 parent 682049e commit 294a253
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
9 changes: 9 additions & 0 deletions amendments.json
Original file line number Diff line number Diff line change
Expand Up @@ -520,5 +520,14 @@
"status": "candidate",
"id": 36
}
],
"closing-procedure": [
{
"description": "Prevent GC of non-closed RTCDataChannels",
"pr": 2902,
"type": "addition",
"status": "candidate",
"id": 38
}
]
}
22 changes: 20 additions & 2 deletions webrtc.html
Original file line number Diff line number Diff line change
Expand Up @@ -1312,6 +1312,13 @@ <h4>
</p>
</li>
<li>
<p>
Let <var>connection</var> have a
<dfn data-dfn-for="RTCPeerConnection">[[\DataChannels]]</dfn> internal slot, initialized to
an empty [=ordered set=].
</p>
</li>
<li>
<p>
Let <var>connection</var> have an <dfn data-dfn-for="RTCPeerConnection">[[\Operations]]</dfn>
internal slot, representing an [= operations chain =],
Expand Down Expand Up @@ -13326,6 +13333,12 @@ <h2>
negotiation-needed flag =] for <var>connection</var>.
</p>
</li>
<li>
<p>
[=list/Append=] <var>channel</var> to
<var>connection</var>.{{RTCPeerConnection/[[DataChannels]]}}.
</p>
</li>
<li>
<p>
Return <var>channel</var> and continue the following
Expand Down Expand Up @@ -13922,7 +13935,7 @@ <h4>
</li>
</ol>
</section>
<section>
<section id="closing-procedure">
<h4>
Closing procedure
</h4>
Expand All @@ -13940,6 +13953,11 @@ <h4>
[= underlying data transport =] was closed.
</p>
</li>
<li>
<p>
Remove <var>channel</var> from <var>connection</var>.{{RTCPeerConnection/[[DataChannels]]}}.
</p>
</li>
<li>
<p>
Unless the procedure was initiated by
Expand All @@ -13948,7 +13966,7 @@ <h4>
{{RTCDataChannelState/"closing"}} and [= fire an event =] named
{{RTCDataChannel/closing}} at <var>channel</var>.
</p>
</li>
</li>
<li>
<p>
Run the following steps in parallel:
Expand Down

0 comments on commit 294a253

Please sign in to comment.