- From: Adam Rice <notifications@github.com>
- Date: Mon, 10 Apr 2017 20:09:57 -0700
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 11 April 2017 03:10:36 UTC
ricea commented on this pull request. > @@ -1935,3 +1934,16 @@ function byteStreamControllerBrandCheckException(name) { return new TypeError( `ReadableByteStreamController.prototype.${name} can only be used on a ReadableByteStreamController`); } + +// Helper function for ReadableStream pipeThrough + +function hasPromiseIsHandledInternalSlot(promise) { + try { + // This relies on the brand-check that is enforced by Promise.prototype.then(). As with the rest of the reference + // implementation, it doesn't attempt to do the right thing if someone has modified the global environment. + Promise.prototype.then.call(promise, undefined, () => {}); Sorry, I did not explain it clearly. If we use undefined, undefined then test 'Piping through a transform errored on the writable end does not cause an unhandled promise rejection' fails. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/streams/pull/730#discussion_r110807428
Received on Tuesday, 11 April 2017 03:10:36 UTC