The Streams specification has been updated with support for a hook to cleanup a TransformStream on error / abort. See https://github.com/whatwg/streams/pull/1283. WPTs are available: https://github.com/web-platform-tests/wpt/pull/40453
<rdar://problem/116607229>