You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
unsigned long grow([EnforceRange] unsigned long delta);
636
634
ArrayBuffer toFixedLengthBuffer();
637
-
ResizableArrayBuffer toResizableBuffer();
638
-
readonly attribute (ArrayBuffer or ResizableArrayBuffer) buffer;
635
+
ArrayBuffer toResizableBuffer();
636
+
readonly attribute ArrayBuffer buffer;
639
637
};
640
638
</pre>
641
639
@@ -644,13 +642,15 @@ which can be simultaneously referenced by multiple {{Instance}} objects. Each
644
642
{{Memory}} object has the following internal slots:
645
643
646
644
* \[[Memory]] : a [=memory address=]
647
-
* \[[BufferObject]] : an {{ArrayBuffer}}or {{ResizableArrayBuffer}}whose [=Data Block=] is [=identified with=] the above memory address
645
+
* \[[BufferObject]] : an {{ArrayBuffer}} whose [=Data Block=] is [=identified with=] the above memory address
648
646
649
647
<div algorithm>
650
648
To <dfn>create a fixed length memory buffer</dfn> from a [=memory address=] |memaddr|, perform the following steps:
651
649
652
650
1. Let |block| be a [=Data Block=] which is [=identified with=] the underlying memory of |memaddr|.
653
-
1. Let |buffer| be a new {{ArrayBuffer}} whose \[[ArrayBufferData]] is |block| and \[[ArrayBufferByteLength]] is set to the length of |block|.
651
+
1. Let |buffer| be a new {{ArrayBuffer}} with the internal slots \[[ArrayBufferData]], \[[ArrayBufferByteLength]], and \[[ArrayBufferDetachKey]].
652
+
1. Set |buffer|.\[[ArrayBufferData]] to |block|.
653
+
1. Set |buffer|.\[[ArrayBufferByteLength]] to |length|.
654
654
1. Set |buffer|.\[[ArrayBufferDetachKey]] to "WebAssembly.Memory".
655
655
1. Return |buffer|.
656
656
</div>
@@ -662,7 +662,10 @@ which can be simultaneously referenced by multiple {{Instance}} objects. Each
662
662
1. Let |length| be the length of |block|.
663
663
1. If |maxsize| > (65536 × 65536),
664
664
1. Throw a {{RangeError}} exception.
665
-
1. Let |buffer| be a new {{ResizableArrayBuffer}} whose \[[ArrayBufferData]] is |block|, \[[ArrayBufferByteLength]] is set to |length|, and \[[ArrayBufferMaxByteLength]] is |maxsize|.
665
+
1. Let |buffer| be a new {{ArrayBuffer}} with the internal slots \[[ArrayBufferData]], \[[ArrayBufferByteLength]], \[[ArrayBufferMaxByteLength]], and \[[ArrayBufferDetachKey]].
666
+
1. Set |buffer|.\[[ArrayBufferData]] to |block|.
667
+
1. Set |buffer|.\[[ArrayBufferByteLength]] to |length|.
668
+
1. Set |buffer|.\[[ArrayBufferMaxByteLength]] is |maxsize|.
666
669
1. Set |buffer|.\[[ArrayBufferDetachKey]] to "WebAssembly.Memory".
667
670
1. Return |buffer|.
668
671
</div>
@@ -766,17 +769,14 @@ Immediately after a WebAssembly [=memory.grow=] instruction executes, perform th
766
769
1. If |memtype| has a max,
767
770
1. Let |maxsize| be the max value in |memtype|.
768
771
1. Otherwise,
769
-
1. Let |maxsize| be an implementation-defined value ≥ |buffer|.\[[ArrayBufferByteLength]] and < (65536 × 65536).
770
-
771
-
Note: The implementation-defined value above is the same across all invocations of this method.
772
-
772
+
1. Let |maxsize| be 65536 × 65536.
773
773
1. Let |resizableBuffer| be the result of [=create a resizable memory buffer|creating a resizable memory buffer=] from |memaddr| and |maxsize|.
0 commit comments