archives

« Bugzilla Issues Index

#3677 — 22.2.1.2 %TypedArray%: Swap steps 17.c and 17.d


22.2.1.2 %TypedArray% ( typedArray )

Steps 17.c and 17.d need to be swapped in case AllocateArrayBuffer detaches the ArrayBuffer `srcData`.


---
class Buffer extends ArrayBuffer {
static get [Symbol.species]() {
return Object.defineProperty(function() { }.bind(), "prototype", {
get() {
detachArrayBuffer(buf);
return ArrayBuffer.prototype;
}
});
}
}

let buf = new Buffer(10);
let ta = new Int8Array(buf);
new Int16Array(ta); // <-- asserts in GetValueFromBuffer
---


fixed in rev32 editor's draft


fixed in rev32 draft