@
love 上面的代码有问题,这个才对
{
let tab = new ArrayBuffer(8)
tab["__proto__"].constructor = {}//不重写这个,后面的 new arraybuffer(8)是可以执行成功的
delete tab
//ArrayBuffer 的引用已被清除
const xhr = new XMLHttpRequest();
xhr.open("GET", "https://cdn 点 jsdelivr 点 net/gh/WildXBird/
r6sground.cn/cache.txt", true)
xhr.responseType = "arraybuffer"
xhr.send()
xhr.onreadystatechange = () => {
if (xhr.readyState == XMLHttpRequest.DONE) {
if (xhr.status >= 200 && xhr.status <= 300) {
let res = xhr.response
console.log(typeof (res))
console.log(res)
let arraybuffer = res["__proto__"].constructor
const buffer = new arraybuffer(8);
console.log(buffer.byteLength);
}
}
}
}