js/src/tests/ecma_6/DataView/detach-after-construction.js
author Carsten "Tomcat" Book <cbook@mozilla.com>
Fri, 18 Dec 2015 15:23:39 +0100
changeset 276928 c5cb194cc9cb
parent 273434 2f0b0b246e25
child 281784 5c756122e168
permissions -rw-r--r--
merge mozilla-inbound to mozilla-central a=merge

// |reftest| skip-if(!xulRuntime.shell)

for (var neuterArg of ['change-data', 'same-data']) {
    var buf = new ArrayBuffer([1,2]);
    var bufView = new DataView(buf);

    neuter(buf, neuterArg);

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

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