From 2a74147f142d1f10b388d09eb126d4ab5c7c419a Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Fri, 2 May 2025 12:25:54 -0400 Subject: [PATCH] Editorial: Replace an unnecessary check with an assertion Fixes #48 --- spec.emu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec.emu b/spec.emu index 7a76f8d..5e62e7e 100644 --- a/spec.emu +++ b/spec.emu @@ -844,7 +844,7 @@ contributors: Mark S. Miller, Richard Gibson 1. If IsSharedArrayBuffer(_O_) is *true*, throw a *TypeError* exception. 1. Let _newByteLength_ be ? ToIndex(_newLength_). 1. If IsDetachedBuffer(_O_) is *true*, throw a *TypeError* exception. - 1. If IsImmutableBuffer(_O_) is *true*, throw a *TypeError* exception. + 1. Assert: IsImmutableBuffer(_O_) is *false*. 1. If _newByteLength_ > _O_.[[ArrayBufferMaxByteLength]], throw a *RangeError* exception. 1. Let _hostHandled_ be ? HostResizeArrayBuffer(_O_, _newByteLength_). 1. If _hostHandled_ is ~handled~, return *undefined*.