Skip to content

Commit

Permalink
Deploying to gh-pages from @ ddd0795 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuckton committed Apr 10, 2024
1 parent eae47f1 commit 23602c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.html
Expand Up @@ -3516,7 +3516,7 @@ <h1><span class="secnum">2.1.5</span> CreateDisposableResource ( <var>V</var>, <
<emu-clause id="sec-getdisposemethod" type="abstract operation" aoid="GetDisposeMethod">
<h1><span class="secnum">2.1.6</span> GetDisposeMethod ( <var>V</var>, <var>hint</var> )</h1>
<p>The abstract operation GetDisposeMethod takes arguments <var>V</var> (an Object) and <var>hint</var> (either <emu-const>sync-dispose</emu-const> or <emu-const>async-dispose</emu-const>) and returns either a <emu-xref href="#sec-completion-record-specification-type"><a href="https://tc39.es/ecma262/#sec-completion-record-specification-type">normal completion containing</a></emu-xref> either a <emu-xref href="#function-object"><a href="https://tc39.es/ecma262/#function-object">function object</a></emu-xref> or <emu-val>undefined</emu-val>, or a <emu-xref href="#sec-completion-record-specification-type"><a href="https://tc39.es/ecma262/#sec-completion-record-specification-type">throw completion</a></emu-xref>. It performs the following steps when called:</p>
<emu-alg><ol><li>If <var>hint</var> is <emu-const>async-dispose</emu-const>, then<ol><li>Let <var>method</var> be ?&nbsp;<emu-xref aoid="GetMethod"><a href="https://tc39.es/ecma262/#sec-getmethod">GetMethod</a></emu-xref>(<var>V</var>, @@asyncDispose).</li><li>If <var>method</var> is <emu-val>undefined</emu-val>, then<ol><li>Set <var>method</var> to ?&nbsp;<emu-xref aoid="GetMethod"><a href="https://tc39.es/ecma262/#sec-getmethod">GetMethod</a></emu-xref>(<var>V</var>, @@dispose).</li><li>If <var>method</var> is not <emu-val>undefined</emu-val>, then<ol><li>Let <var>closure</var> be a new <emu-xref href="#sec-abstract-closure"><a href="https://tc39.es/ecma262/#sec-abstract-closure">Abstract Closure</a></emu-xref> with no parameters that captures <var>method</var> and performs the following steps when called:<ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>Perform ?&nbsp;<emu-xref aoid="Call"><a href="https://tc39.es/ecma262/#sec-call">Call</a></emu-xref>(<var>method</var>, <var>O</var>).</li><li>Return <emu-val>undefined</emu-val>.</li></ol></li><li>NOTE: This function is not observable to user code. It is used to ensure that a Promise returned from a synchronous <code>@@dispose</code> method will not be awaited.</li><li>Return <emu-xref aoid="CreateBuiltinFunction"><a href="https://tc39.es/ecma262/#sec-createbuiltinfunction">CreateBuiltinFunction</a></emu-xref>(<var>closure</var>, 0, <emu-val>""</emu-val>, « »).</li></ol></li></ol></li></ol></li><li>Else,<ol><li>Let <var>method</var> be ?&nbsp;<emu-xref aoid="GetMethod"><a href="https://tc39.es/ecma262/#sec-getmethod">GetMethod</a></emu-xref>(<var>V</var>, @@dispose).</li></ol></li><li>Return <var>method</var>.</li></ol></emu-alg>
<emu-alg><ol><li>If <var>hint</var> is <emu-const>async-dispose</emu-const>, then<ol><li>Let <var>method</var> be ?&nbsp;<emu-xref aoid="GetMethod"><a href="https://tc39.es/ecma262/#sec-getmethod">GetMethod</a></emu-xref>(<var>V</var>, @@asyncDispose).</li><li>If <var>method</var> is <emu-val>undefined</emu-val>, then<ol><li>Set <var>method</var> to ?&nbsp;<emu-xref aoid="GetMethod"><a href="https://tc39.es/ecma262/#sec-getmethod">GetMethod</a></emu-xref>(<var>V</var>, @@dispose).</li><li>If <var>method</var> is not <emu-val>undefined</emu-val>, then<ol><li>Let <var>closure</var> be a new <emu-xref href="#sec-abstract-closure"><a href="https://tc39.es/ecma262/#sec-abstract-closure">Abstract Closure</a></emu-xref> with no parameters that captures <var>method</var> and performs the following steps when called:<ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>Let <var>promiseCapability</var> be !&nbsp;<emu-xref aoid="NewPromiseCapability"><a href="https://tc39.es/ecma262/#sec-newpromisecapability">NewPromiseCapability</a></emu-xref>(<emu-xref href="#sec-promise-constructor"><a href="https://tc39.es/ecma262/#sec-promise-constructor">%Promise%</a></emu-xref>).</li><li>Let <var>result</var> be <emu-xref aoid="Completion"><a href="https://tc39.es/ecma262/#sec-completion-ao">Completion</a></emu-xref>(<emu-xref aoid="Call"><a href="https://tc39.es/ecma262/#sec-call">Call</a></emu-xref>(<var>method</var>, <var>O</var>)).</li><li><emu-xref aoid="IfAbruptRejectPromise"><a href="https://tc39.es/ecma262/#sec-ifabruptrejectpromise">IfAbruptRejectPromise</a></emu-xref>(<var>result</var>, <var>promiseCapability</var>).</li><li>Perform ?&nbsp;<emu-xref aoid="Call"><a href="https://tc39.es/ecma262/#sec-call">Call</a></emu-xref>(<var>promiseCapability</var>.[[Resolve]], <emu-val>undefined</emu-val>, « <emu-val>undefined</emu-val> »).</li><li>Return <var>promiseCapability</var>.[[Promise]].</li></ol></li><li>NOTE: This function is not observable to user code. It is used to ensure that a Promise returned from a synchronous <code>@@dispose</code> method will not be awaited and that any exception thrown will not be thrown synchronously.</li><li>Return <emu-xref aoid="CreateBuiltinFunction"><a href="https://tc39.es/ecma262/#sec-createbuiltinfunction">CreateBuiltinFunction</a></emu-xref>(<var>closure</var>, 0, <emu-val>""</emu-val>, « »).</li></ol></li></ol></li></ol></li><li>Else,<ol><li>Let <var>method</var> be ?&nbsp;<emu-xref aoid="GetMethod"><a href="https://tc39.es/ecma262/#sec-getmethod">GetMethod</a></emu-xref>(<var>V</var>, @@dispose).</li></ol></li><li>Return <var>method</var>.</li></ol></emu-alg>
</emu-clause>

<emu-clause id="sec-dispose" type="abstract operation" aoid="Dispose">
Expand Down

0 comments on commit 23602c2

Please sign in to comment.