From 65299236088f2637b1f7969730825eff0e485940 Mon Sep 17 00:00:00 2001 From: Adam Rice Date: Tue, 19 Sep 2017 16:46:08 +0900 Subject: [PATCH] Remove assertion that RSDefaultControllerClose doesn't throw ReadableStreamDefaultControllerClose is defined in the standard as "nothrow" but TransformStreamCloseReadableInternal contains an assert that it doesn't throw. The assertion that it doesn't throw is already implied by the "nothrow" annotation. Since it is good to aim for a 1:1 relationship between the reference implementation and the standard text, the reference implementation shouldn't contain this assert either. Removed. --- reference-implementation/lib/transform-stream.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/reference-implementation/lib/transform-stream.js b/reference-implementation/lib/transform-stream.js index 26370769e..fee465aae 100644 --- a/reference-implementation/lib/transform-stream.js +++ b/reference-implementation/lib/transform-stream.js @@ -106,11 +106,7 @@ function TransformStreamCloseReadableInternal(transformStream) { assert(transformStream._errored === false); assert(ReadableStreamDefaultControllerCanCloseOrEnqueue(transformStream._readableController) === true); - try { - ReadableStreamDefaultControllerClose(transformStream._readableController); - } catch (e) { - assert(false); - } + ReadableStreamDefaultControllerClose(transformStream._readableController); } function TransformStreamDefaultTransform(chunk, transformStreamController) {