From 3b3345aef30078d350222511191058f142cf962a Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Wed, 22 Mar 2023 14:02:19 -0700 Subject: [PATCH] [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 --- spec.emu | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/spec.emu b/spec.emu index 563e00f..8d81809 100644 --- a/spec.emu +++ b/spec.emu @@ -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~.