diff --git a/document/js-api/index.bs b/document/js-api/index.bs index c00cadeedc..b83407daf4 100644 --- a/document/js-api/index.bs +++ b/document/js-api/index.bs @@ -768,10 +768,9 @@ Immediately after a WebAssembly [=memory.grow=] instruction executes, perform th 1. Let |memaddr| be **this**.\[[Memory]]. 1. Let |store| be the [=surrounding agent=]'s [=associated store=]. 1. Let |memtype| be [=mem_type=](|store|, |memaddr|). - 1. If |memtype| has a max, - 1. Let |maxsize| be the max value in |memtype|. - 1. Otherwise, - 1. Let |maxsize| be 65536 × 65536. + 1. If |memtype| does not have a max, + 1. [=Throw=] a {{TypeError}} exception. + 1. Let |maxsize| be the max value in |memtype|. 1. Let |resizableBuffer| be the result of [=create a resizable memory buffer|creating a resizable memory buffer=] from |memaddr| and |maxsize|. 1. Perform [=!=] [$DetachArrayBuffer$](|buffer|, "WebAssembly.Memory"). 1. Set **this**.\[[BufferObject]] to |resizableBuffer|.