Lines Matching refs:port2
45 const { port1, port2 } = new MessageChannel();
47 port2.onmessageerror = common.mustNotCall();
50 // port1 first, then again to port2, which reads the data.
57 // 2. Calling port2.postMessage causes a new internal WritableStream W1
66 // 5. ReadableStream R3 is passed to the port2.onmessage callback as the
68 // 6. Once the reader is attached to R3 in the port2.onmessage callback,
89 port2.onmessage = common.mustCall(({ data }) => {
97 port2.close();
107 assert.throws(() => port2.postMessage(readable), {
111 port2.postMessage(readable, [readable]);
116 const { port1, port2 } = new MessageChannel();
118 port2.onmessageerror = common.mustNotCall();
137 port2.onmessage = common.mustCall(({ data }) => {
146 port2.close();
157 assert.throws(() => port2.postMessage(readable), {
161 port2.postMessage(readable, [readable]);
166 const { port1, port2 } = new MessageChannel();
168 port2.onmessageerror = common.mustNotCall();
177 // immediately transfers that to port2. Doing so creates an internal
180 // port2.onmessage.
182 // When the writer on port2.onmessage writes the chunk of data, it
192 port2.onmessage = common.mustCall(({ data }) => {
198 port2.close();
208 assert.throws(() => port2.postMessage(writable), {
212 port2.postMessage(writable, [writable]);
217 const { port1, port2 } = new MessageChannel();
219 port2.onmessageerror = common.mustNotCall();
238 // that to port2.onmessage.
267 port2.onmessage = common.mustCall(({ data }) => {
282 port2.close();
294 assert.throws(() => port2.postMessage(transform), {
298 port2.postMessage(transform, [transform]);
304 const { port1, port2 } = new MessageChannel();
325 port2.postMessage(readable, [readable]);
341 const { port1, port2 } = new MessageChannel();
377 port2.postMessage(writable, [writable]);
382 const { port1, port2 } = new MessageChannel();
406 port2.postMessage(writable, [writable]);
410 const { port1, port2 } = new MessageChannel();
435 port2.postMessage(writable, [writable]);
488 const { port1, port2 } = new MessageChannel();
495 port2.postMessage(readable, [readable]);
510 const { port1, port2 } = new MessageChannel();
529 port2.postMessage(readable, [readable]);
544 const { port1, port2 } = new MessageChannel();
554 port2.postMessage(writable, [writable]);