Skip to content

Commit 3b3345a

Browse files
authored
[spec] clean up AddDisposableResource (#150)
This AO is only ever called with a value and no method, or, with an undefined value and a method
1 parent f03a9f2 commit 3b3345a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

spec.emu

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,11 +1004,8 @@ contributors: Ron Buckton, Ecma International
10041004
1. If Type(_V_) is not Object, throw a *TypeError* exception.
10051005
1. Let _resource_ be ? CreateDisposableResource(_V_, _hint_).
10061006
1. Else,
1007-
1. If _V_ is *null* or *undefined*, then
1008-
1. Let _resource_ be ? CreateDisposableResource(*undefined*, _hint_, _method_).
1009-
1. Else,
1010-
1. If Type(_V_) is not Object, throw a *TypeError* exception.
1011-
1. Let _resource_ be ? CreateDisposableResource(_V_, _hint_, _method_).
1007+
1. Assert: _V_ is *undefined*.
1008+
1. Let _resource_ be ? CreateDisposableResource(*undefined*, _hint_, _method_).
10121009
1. Append _resource_ to _disposeCapability_.[[DisposableResourceStack]].
10131010
1. Return ~unused~.
10141011
</emu-alg>

0 commit comments

Comments
 (0)