Skip to content

Commit

Permalink
[spec] clean up AddDisposableResource (#150)
Browse files Browse the repository at this point in the history
This AO is only ever called with a value and no method, or, with an undefined value and a method
  • Loading branch information
ljharb authored Mar 22, 2023
1 parent f03a9f2 commit 3b3345a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions spec.emu
Original file line number Diff line number Diff line change
Expand Up @@ -1004,11 +1004,8 @@ contributors: Ron Buckton, Ecma International
1. If Type(_V_) is not Object, throw a *TypeError* exception.
1. Let _resource_ be ? CreateDisposableResource(_V_, _hint_).
1. Else,
1. If _V_ is *null* or *undefined*, then
1. Let _resource_ be ? CreateDisposableResource(*undefined*, _hint_, _method_).
1. Else,
1. If Type(_V_) is not Object, throw a *TypeError* exception.
1. Let _resource_ be ? CreateDisposableResource(_V_, _hint_, _method_).
1. Assert: _V_ is *undefined*.
1. Let _resource_ be ? CreateDisposableResource(*undefined*, _hint_, _method_).
1. Append _resource_ to _disposeCapability_.[[DisposableResourceStack]].
1. Return ~unused~.
</emu-alg>
Expand Down

0 comments on commit 3b3345a

Please sign in to comment.