summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/DataView/detach-after-construction.js
blob: e767fcffaee8eb8717359241d77368c7b58d41e9 (plain)
1
2
3
4
5
6
7
8
9
var buf = new ArrayBuffer([1,2]);
var bufView = new DataView(buf);

detachArrayBuffer(buf);

assertThrowsInstanceOf(() => bufView.getInt8(0), TypeError);

if (typeof reportCompare === 'function')
    reportCompare(0, 0, "OK");