@@ -4520,41 +4520,6 @@ contributors: Ron Buckton, Ecma International
4520
4520
<li>does not have a [[DisposableState]] internal slot or any of the other internal slots of DisposableStack instances.</li>
4521
4521
</ul>
4522
4522
4523
- <emu-clause id="sec-get-disposablestack.prototype.disposed">
4524
- <h1>get DisposableStack.prototype.disposed</h1>
4525
- <p>`DisposableStack.prototype.disposed` is an accessor property whose set accessor function is *undefined*. Its get accessor function performs the following steps:</p>
4526
- <emu-alg>
4527
- 1. Let _disposableStack_ be the *this* value.
4528
- 1. Perform ? RequireInternalSlot(_disposableStack_, [[DisposableState]]).
4529
- 1. If _disposableStack_.[[DisposableState]] is ~disposed~, return *true*.
4530
- 1. Otherwise, return *false*.
4531
- </emu-alg>
4532
- </emu-clause>
4533
-
4534
- <emu-clause id="sec-disposablestack.prototype.dispose">
4535
- <h1>DisposableStack.prototype.dispose ()</h1>
4536
- <p>This method performs the following steps when called:</p>
4537
- <emu-alg>
4538
- 1. Let _disposableStack_ be the *this* value.
4539
- 1. Perform ? RequireInternalSlot(_disposableStack_, [[DisposableState]]).
4540
- 1. If _disposableStack_.[[DisposableState]] is ~disposed~, return *undefined*.
4541
- 1. Set _disposableStack_.[[DisposableState]] to ~disposed~.
4542
- 1. Return DisposeResources(_disposableStack_.[[DisposeCapability]], NormalCompletion(*undefined*)).
4543
- </emu-alg>
4544
- </emu-clause>
4545
-
4546
- <emu-clause id="sec-disposablestack.prototype.use">
4547
- <h1>DisposableStack.prototype.use( _value_ )</h1>
4548
- <p>This method performs the following steps when called:</p>
4549
- <emu-alg>
4550
- 1. Let _disposableStack_ be the *this* value.
4551
- 1. Perform ? RequireInternalSlot(_disposableStack_, [[DisposableState]]).
4552
- 1. If _disposableStack_.[[DisposableState]] is ~disposed~, throw a *ReferenceError* exception.
4553
- 1. Perform ? AddDisposableResource(_disposableStack_.[[DisposeCapability]], _value_, ~sync-dispose~).
4554
- 1. Return _value_.
4555
- </emu-alg>
4556
- </emu-clause>
4557
-
4558
4523
<emu-clause id="sec-disposablestack.prototype.adopt">
4559
4524
<h1>DisposableStack.prototype.adopt( _value_, _onDispose_ )</h1>
4560
4525
<p>This method performs the following steps when called:</p>
@@ -4584,6 +4549,29 @@ contributors: Ron Buckton, Ecma International
4584
4549
</emu-alg>
4585
4550
</emu-clause>
4586
4551
4552
+ <emu-clause id="sec-disposablestack.prototype.dispose">
4553
+ <h1>DisposableStack.prototype.dispose ()</h1>
4554
+ <p>This method performs the following steps when called:</p>
4555
+ <emu-alg>
4556
+ 1. Let _disposableStack_ be the *this* value.
4557
+ 1. Perform ? RequireInternalSlot(_disposableStack_, [[DisposableState]]).
4558
+ 1. If _disposableStack_.[[DisposableState]] is ~disposed~, return *undefined*.
4559
+ 1. Set _disposableStack_.[[DisposableState]] to ~disposed~.
4560
+ 1. Return DisposeResources(_disposableStack_.[[DisposeCapability]], NormalCompletion(*undefined*)).
4561
+ </emu-alg>
4562
+ </emu-clause>
4563
+
4564
+ <emu-clause id="sec-get-disposablestack.prototype.disposed">
4565
+ <h1>get DisposableStack.prototype.disposed</h1>
4566
+ <p>`DisposableStack.prototype.disposed` is an accessor property whose set accessor function is *undefined*. Its get accessor function performs the following steps:</p>
4567
+ <emu-alg>
4568
+ 1. Let _disposableStack_ be the *this* value.
4569
+ 1. Perform ? RequireInternalSlot(_disposableStack_, [[DisposableState]]).
4570
+ 1. If _disposableStack_.[[DisposableState]] is ~disposed~, return *true*.
4571
+ 1. Otherwise, return *false*.
4572
+ </emu-alg>
4573
+ </emu-clause>
4574
+
4587
4575
<emu-clause id="sec-disposablestack.prototype.move">
4588
4576
<h1>DisposableStack.prototype.move()</h1>
4589
4577
<p>This method performs the following steps when called:</p>
@@ -4600,6 +4588,18 @@ contributors: Ron Buckton, Ecma International
4600
4588
</emu-alg>
4601
4589
</emu-clause>
4602
4590
4591
+ <emu-clause id="sec-disposablestack.prototype.use">
4592
+ <h1>DisposableStack.prototype.use( _value_ )</h1>
4593
+ <p>This method performs the following steps when called:</p>
4594
+ <emu-alg>
4595
+ 1. Let _disposableStack_ be the *this* value.
4596
+ 1. Perform ? RequireInternalSlot(_disposableStack_, [[DisposableState]]).
4597
+ 1. If _disposableStack_.[[DisposableState]] is ~disposed~, throw a *ReferenceError* exception.
4598
+ 1. Perform ? AddDisposableResource(_disposableStack_.[[DisposeCapability]], _value_, ~sync-dispose~).
4599
+ 1. Return _value_.
4600
+ </emu-alg>
4601
+ </emu-clause>
4602
+
4603
4603
<emu-clause id="sec-disposablestack.prototype-@@dispose">
4604
4604
<h1>DisposableStack.prototype [ @@dispose ] ()</h1>
4605
4605
<p>The initial value of the @@dispose property is %DisposableStack.prototype.dispose%, defined in <emu-xref href="#sec-disposablestack.prototype.dispose"></emu-xref>.</p>
@@ -4714,14 +4714,32 @@ contributors: Ron Buckton, Ecma International
4714
4714
<li>does not have an [[AsyncDisposableState]] internal slot or any of the other internal slots of AsyncDisposableStack instances.</li>
4715
4715
</ul>
4716
4716
4717
- <emu-clause id="sec-get- asyncdisposablestack.prototype.disposed ">
4718
- <h1>get AsyncDisposableStack.prototype.disposed </h1>
4719
- <p>`AsyncDisposableStack.prototype.disposed` is an accessor property whose set accessor function is *undefined*. Its get accessor function performs the following steps:</p>
4717
+ <emu-clause id="sec-asyncdisposablestack.prototype.adopt ">
4718
+ <h1>AsyncDisposableStack.prototype.adopt( _value_, _onDisposeAsync_ ) </h1>
4719
+ <p>This method performs the following steps when called :</p>
4720
4720
<emu-alg>
4721
4721
1. Let _asyncDisposableStack_ be the *this* value.
4722
4722
1. Perform ? RequireInternalSlot(_asyncDisposableStack_, [[AsyncDisposableState]]).
4723
- 1. If _asyncDisposableStack_.[[AsyncDisposableState]] is ~disposed~, return *true*.
4724
- 1. Otherwise, return *false*.
4723
+ 1. If _asyncDisposableStack_.[[AsyncDisposableState]] is ~disposed~, throw a *ReferenceError* exception.
4724
+ 1. If IsCallable(_onDisposeAsync_) is *false*, throw a *TypeError* exception.
4725
+ 1. Let _closure_ be a new Abstract Closure with no parameters that captures _value_ and _onDisposeAsync_ and performs the following steps when called:
4726
+ 1. Return ? Call(_onDisposeAsync_, *undefined*, « _value_ »).
4727
+ 1. Let _F_ be CreateBuiltinFunction(_closure_, 0, *""*, « »).
4728
+ 1. Perform ? AddDisposableResource(_asyncDisposableStack_.[[DisposeCapability]], *undefined*, ~async-dispose~, _F_).
4729
+ 1. Return _value_.
4730
+ </emu-alg>
4731
+ </emu-clause>
4732
+
4733
+ <emu-clause id="sec-asyncdisposablestack.prototype.defer">
4734
+ <h1>AsyncDisposableStack.prototype.defer( _onDisposeAsync_ )</h1>
4735
+ <p>This method performs the following steps when called:</p>
4736
+ <emu-alg>
4737
+ 1. Let _asyncDisposableStack_ be the *this* value.
4738
+ 1. Perform ? RequireInternalSlot(_asyncDisposableStack_, [[AsyncDisposableState]]).
4739
+ 1. If _asyncDisposableStack_.[[AsyncDisposableState]] is ~disposed~, throw a *ReferenceError* exception.
4740
+ 1. If IsCallable(_onDisposeAsync_) is *false*, throw a *TypeError* exception.
4741
+ 1. Perform ? AddDisposableResource(_asyncDisposableStack_.[[DisposeCapability]], *undefined*, ~async-dispose~, _onDisposeAsync_).
4742
+ 1. Return *undefined*.
4725
4743
</emu-alg>
4726
4744
</emu-clause>
4727
4745
@@ -4745,44 +4763,14 @@ contributors: Ron Buckton, Ecma International
4745
4763
</emu-alg>
4746
4764
</emu-clause>
4747
4765
4748
- <emu-clause id="sec-asyncdisposablestack.prototype.use">
4749
- <h1>AsyncDisposableStack.prototype.use( _value_ )</h1>
4750
- <p>This method performs the following steps when called:</p>
4751
- <emu-alg>
4752
- 1. Let _asyncDisposableStack_ be the *this* value.
4753
- 1. Perform ? RequireInternalSlot(_asyncDisposableStack_, [[AsyncDisposableState]]).
4754
- 1. If _asyncDisposableStack_.[[AsyncDisposableState]] is ~disposed~, throw a *ReferenceError* exception.
4755
- 1. Perform ? AddDisposableResource(_asyncDisposableStack_.[[DisposeCapability]], _value_, ~async-dispose~).
4756
- 1. Return _value_.
4757
- </emu-alg>
4758
- </emu-clause>
4759
-
4760
- <emu-clause id="sec-asyncdisposablestack.prototype.adopt">
4761
- <h1>AsyncDisposableStack.prototype.adopt( _value_, _onDisposeAsync_ )</h1>
4762
- <p>This method performs the following steps when called:</p>
4763
- <emu-alg>
4764
- 1. Let _asyncDisposableStack_ be the *this* value.
4765
- 1. Perform ? RequireInternalSlot(_asyncDisposableStack_, [[AsyncDisposableState]]).
4766
- 1. If _asyncDisposableStack_.[[AsyncDisposableState]] is ~disposed~, throw a *ReferenceError* exception.
4767
- 1. If IsCallable(_onDisposeAsync_) is *false*, throw a *TypeError* exception.
4768
- 1. Let _closure_ be a new Abstract Closure with no parameters that captures _value_ and _onDisposeAsync_ and performs the following steps when called:
4769
- 1. Return ? Call(_onDisposeAsync_, *undefined*, « _value_ »).
4770
- 1. Let _F_ be CreateBuiltinFunction(_closure_, 0, *""*, « »).
4771
- 1. Perform ? AddDisposableResource(_asyncDisposableStack_.[[DisposeCapability]], *undefined*, ~async-dispose~, _F_).
4772
- 1. Return _value_.
4773
- </emu-alg>
4774
- </emu-clause>
4775
-
4776
- <emu-clause id="sec-asyncdisposablestack.prototype.defer">
4777
- <h1>AsyncDisposableStack.prototype.defer( _onDisposeAsync_ )</h1>
4778
- <p>This method performs the following steps when called:</p>
4766
+ <emu-clause id="sec-get-asyncdisposablestack.prototype.disposed">
4767
+ <h1>get AsyncDisposableStack.prototype.disposed</h1>
4768
+ <p>`AsyncDisposableStack.prototype.disposed` is an accessor property whose set accessor function is *undefined*. Its get accessor function performs the following steps:</p>
4779
4769
<emu-alg>
4780
4770
1. Let _asyncDisposableStack_ be the *this* value.
4781
4771
1. Perform ? RequireInternalSlot(_asyncDisposableStack_, [[AsyncDisposableState]]).
4782
- 1. If _asyncDisposableStack_.[[AsyncDisposableState]] is ~disposed~, throw a *ReferenceError* exception.
4783
- 1. If IsCallable(_onDisposeAsync_) is *false*, throw a *TypeError* exception.
4784
- 1. Perform ? AddDisposableResource(_asyncDisposableStack_.[[DisposeCapability]], *undefined*, ~async-dispose~, _onDisposeAsync_).
4785
- 1. Return *undefined*.
4772
+ 1. If _asyncDisposableStack_.[[AsyncDisposableState]] is ~disposed~, return *true*.
4773
+ 1. Otherwise, return *false*.
4786
4774
</emu-alg>
4787
4775
</emu-clause>
4788
4776
@@ -4802,6 +4790,18 @@ contributors: Ron Buckton, Ecma International
4802
4790
</emu-alg>
4803
4791
</emu-clause>
4804
4792
4793
+ <emu-clause id="sec-asyncdisposablestack.prototype.use">
4794
+ <h1>AsyncDisposableStack.prototype.use( _value_ )</h1>
4795
+ <p>This method performs the following steps when called:</p>
4796
+ <emu-alg>
4797
+ 1. Let _asyncDisposableStack_ be the *this* value.
4798
+ 1. Perform ? RequireInternalSlot(_asyncDisposableStack_, [[AsyncDisposableState]]).
4799
+ 1. If _asyncDisposableStack_.[[AsyncDisposableState]] is ~disposed~, throw a *ReferenceError* exception.
4800
+ 1. Perform ? AddDisposableResource(_asyncDisposableStack_.[[DisposeCapability]], _value_, ~async-dispose~).
4801
+ 1. Return _value_.
4802
+ </emu-alg>
4803
+ </emu-clause>
4804
+
4805
4805
<emu-clause id="sec-asyncdisposablestack.prototype-@@asyncDispose">
4806
4806
<h1>AsyncDisposableStack.prototype [ @@asyncDispose ] ()</h1>
4807
4807
<p>The initial value of the @@asyncDispose property is %AsyncDisposableStack.prototype.disposeAsync%, defined in <emu-xref href="#sec-asyncdisposablestack.prototype.disposeAsync"></emu-xref>.</p>
0 commit comments