summaryrefslogtreecommitdiffstats
path: root/dom/streams/test/xpcshell/bug-1503406.js
blob: 8e45291faff1e79c5e02eb0a8c9741cd786b2bfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
let read;
let reader;

add_task(async function test() {
  let g = newGlobal({ wantGlobalProperties: ["ReadableStream"] });
  reader = g.eval(`
    let stream = new ReadableStream({
        start(controller) {
            controller.enqueue([]);
        },
    });
    let [b1, b2] = stream.tee();
    b1.getReader();
`);
  read = new ReadableStream({}).getReader().read;
});

add_task(async function test2() {
  read.call(reader);
});