From 0bb82322c3a94012e7519573bb56a274d681719c Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Tue, 24 Jan 2023 16:56:23 -0500 Subject: [PATCH] Streamline DisposableStack.prototype.use --- spec.emu | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/spec.emu b/spec.emu index 9633275..9a944c2 100644 --- a/spec.emu +++ b/spec.emu @@ -3605,13 +3605,7 @@ contributors: Ron Buckton, Ecma International 1. Let _disposableStack_ be the *this* value. 1. Perform ? RequireInternalSlot(_disposableStack_, [[DisposableState]]). 1. If _disposableStack_.[[DisposableState]] is ~disposed~, throw a *ReferenceError* exception. - 1. If _value_ is neither *null* nor *undefined*, then - 1. If Type(_value_) is not Object, throw a *TypeError* exception. - 1. Let _method_ be GetDisposeMethod(_value_, ~sync-dispose~). - 1. If _method_ is *undefined*, then - 1. Throw a *TypeError* exception. - 1. Else, - 1. Perform ? AddDisposableResource(_disposableStack_, _value_, ~sync-dispose~, _method_). + 1. Perform ? AddDisposableResource(_disposableStack_, _value_, ~sync-dispose~). 1. Return _value_.