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
{{ message }}
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.
The problem is that if the current spec is taken as-is, we end up with some weird objects, eg, I've seen an ArrayBuffer with a prototype that is the SharedArrayBufferPrototype.
The intent of the Shared Memory spec is that the TypedArray methods should
construct plain ArrayBuffers in this case. I'll take a look at the prose
you point to.
Okay. In that case, the Shared Memory spec needs to specify the following changes to 22.2.4.3, steps 17-18:
17. If SameValue(elementType, srcType) is true, then
a. Let srcLength be typedArray.[[ByteLength]].
b. If IsSharedArrayBuffer(srcData) is false, then
i. Let data be ? CloneArrayBuffer(srcData, srcByteOffset, srcLength).
c. Else,
i. Let data be ? CloneArrayBuffer(srcData, srcByteOffset, srcLength, %ArrayBuffer%).
18. Else,
a. If IsSharedArrayBuffer(srcData) is false, then
i. Let bufferConstructor be ? SpeciesConstructor(srcData, %ArrayBuffer%).
b. Else,
i. Let bufferConstructor be %ArrayBuffer%.
b. Let data be ? AllocateArrayBuffer(bufferConstructor, byteLength).
This seems reasonable to me. Discuss.
The text was updated successfully, but these errors were encountered:
The problem is that if the current spec is taken as-is, we end up with some weird objects, eg, I've seen an ArrayBuffer with a prototype that is the SharedArrayBufferPrototype.
See https://bugzilla.mozilla.org/show_bug.cgi?id=1314564 for more information. Excerpted from there:
me:
@anba:
Okay. In that case, the Shared Memory spec needs to specify the following changes to 22.2.4.3, steps 17-18:
This seems reasonable to me. Discuss.
The text was updated successfully, but these errors were encountered: