summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_6/DataView/detach-after-construction.js
blob: 7e99247785a6d11e50ec18e1a6ffac86d440a527 (plain)
1
2
3
4
5
6
7
8
9
10
11
// |reftest| skip-if(!xulRuntime.shell) -- needs detachArrayBuffer

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");