summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/stream/bug-1503399-2.js
blob: c8704e64473b92b8ac4055be6b9e1779350e525c (plain)
1
2
3
4
5
6
7
8
9
10
11
// Don't assert if the wrapper that's the value of reader.[[stream]] gets nuked.

load(libdir + "asserts.js");

let g = newGlobal({newCompartment: true});
let stream = new g.ReadableStream({});
let reader = ReadableStream.prototype.getReader.call(stream);
nukeCCW(stream);

assertErrorMessage(() => reader.read(), TypeError, "can't access dead object");
assertErrorMessage(() => reader.releaseLock(), TypeError, "can't access dead object");