archives

« Bugzilla Issues Index

#3678 — 24.1.1.4 CloneArrayBuffer: Add IsDetachedBuffer check after steps 10-11


24.1.1.4 CloneArrayBuffer( srcBuffer, srcByteOffset )

IsDetachedBuffer needs to be tested in case AllocateArrayBuffer detaches the ArrayBuffer `srcBuffer`.

---
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 Int8Array(ta);
---


fixed in rev32 editor's draft


fixed in rev32 draft