|
5918 | 5918 | "rationale": ".algorithm", |
5919 | 5919 | "steps": [ |
5920 | 5920 | { |
5921 | | - "html": "<p>Let <var>returnValue</var> be the result of performing <var>controller</var>.<a data-link-type=\"dfn\" href=\"https://streams.spec.whatwg.org/#writablestreamdefaultcontroller-strategysizealgorithm\" id=\"ref-for-writablestreamdefaultcontroller-strategysizealgorithm②\">[[strategySizeAlgorithm]]</a>, passing in <var>chunk</var>,\n and interpreting the result as a <a data-link-type=\"dfn\" href=\"https://tc39.es/ecma262/multipage/ecmascript-data-types-and-values.html#sec-completion-record-specification-type\" id=\"ref-for-sec-completion-record-specification-type②\">completion record</a>.</p>" |
| 5921 | + "html": "If <var>controller</var>.<a data-link-type=\"dfn\" href=\"https://streams.spec.whatwg.org/#writablestreamdefaultcontroller-strategysizealgorithm\" id=\"ref-for-writablestreamdefaultcontroller-strategysizealgorithm②\">[[strategySizeAlgorithm]]</a> is undefined, then:", |
| 5922 | + "rationale": "assert", |
| 5923 | + "steps": [ |
| 5924 | + { |
| 5925 | + "html": "<p class=\"assertion\">Assert: <var>controller</var>.<a data-link-type=\"dfn\" href=\"https://streams.spec.whatwg.org/#writablestreamdefaultcontroller-stream\" id=\"ref-for-writablestreamdefaultcontroller-stream⑤\">[[stream]]</a>.<a data-link-type=\"dfn\" href=\"https://streams.spec.whatwg.org/#writablestream-state\" id=\"ref-for-writablestream-state③②\">[[state]]</a> is \"<code>erroring</code>\" or\n \"<code>errored</code>\".</p>" |
| 5926 | + }, |
| 5927 | + { |
| 5928 | + "html": "<p>Return 1.</p>" |
| 5929 | + } |
| 5930 | + ] |
| 5931 | + }, |
| 5932 | + { |
| 5933 | + "html": "<p>Let <var>returnValue</var> be the result of performing <var>controller</var>.<a data-link-type=\"dfn\" href=\"https://streams.spec.whatwg.org/#writablestreamdefaultcontroller-strategysizealgorithm\" id=\"ref-for-writablestreamdefaultcontroller-strategysizealgorithm③\">[[strategySizeAlgorithm]]</a>, passing in <var>chunk</var>,\n and interpreting the result as a <a data-link-type=\"dfn\" href=\"https://tc39.es/ecma262/multipage/ecmascript-data-types-and-values.html#sec-completion-record-specification-type\" id=\"ref-for-sec-completion-record-specification-type②\">completion record</a>.</p>" |
5922 | 5934 | }, |
5923 | 5935 | { |
5924 | 5936 | "html": "If <var>returnValue</var> is an abrupt completion,", |
|
5955 | 5967 | "rationale": ".algorithm", |
5956 | 5968 | "steps": [ |
5957 | 5969 | { |
5958 | | - "html": "<p>Let <var>stream</var> be <var>controller</var>.<a data-link-type=\"dfn\" href=\"https://streams.spec.whatwg.org/#writablestreamdefaultcontroller-stream\" id=\"ref-for-writablestreamdefaultcontroller-stream⑤\">[[stream]]</a>.</p>" |
| 5970 | + "html": "<p>Let <var>stream</var> be <var>controller</var>.<a data-link-type=\"dfn\" href=\"https://streams.spec.whatwg.org/#writablestreamdefaultcontroller-stream\" id=\"ref-for-writablestreamdefaultcontroller-stream⑥\">[[stream]]</a>.</p>" |
5959 | 5971 | }, |
5960 | 5972 | { |
5961 | 5973 | "html": "<p>Perform ! <a data-link-type=\"abstract-op\" href=\"https://streams.spec.whatwg.org/#writable-stream-mark-close-request-in-flight\" id=\"ref-for-writable-stream-mark-close-request-in-flight\">WritableStreamMarkCloseRequestInFlight</a>(<var>stream</var>).</p>" |
|
5999 | 6011 | "rationale": ".algorithm", |
6000 | 6012 | "steps": [ |
6001 | 6013 | { |
6002 | | - "html": "<p>Let <var>stream</var> be <var>controller</var>.<a data-link-type=\"dfn\" href=\"https://streams.spec.whatwg.org/#writablestreamdefaultcontroller-stream\" id=\"ref-for-writablestreamdefaultcontroller-stream⑥\">[[stream]]</a>.</p>" |
| 6014 | + "html": "<p>Let <var>stream</var> be <var>controller</var>.<a data-link-type=\"dfn\" href=\"https://streams.spec.whatwg.org/#writablestreamdefaultcontroller-stream\" id=\"ref-for-writablestreamdefaultcontroller-stream⑦\">[[stream]]</a>.</p>" |
6003 | 6015 | }, |
6004 | 6016 | { |
6005 | 6017 | "html": "<p>Perform ! <a data-link-type=\"abstract-op\" href=\"https://streams.spec.whatwg.org/#writable-stream-mark-first-write-request-in-flight\" id=\"ref-for-writable-stream-mark-first-write-request-in-flight\">WritableStreamMarkFirstWriteRequestInFlight</a>(<var>stream</var>).</p>" |
|
6015 | 6027 | "html": "<p>Perform ! <a data-link-type=\"abstract-op\" href=\"https://streams.spec.whatwg.org/#writable-stream-finish-in-flight-write\" id=\"ref-for-writable-stream-finish-in-flight-write\">WritableStreamFinishInFlightWrite</a>(<var>stream</var>).</p>" |
6016 | 6028 | }, |
6017 | 6029 | { |
6018 | | - "html": "<p>Let <var>state</var> be <var>stream</var>.<a data-link-type=\"dfn\" href=\"https://streams.spec.whatwg.org/#writablestream-state\" id=\"ref-for-writablestream-state③②\">[[state]]</a>.</p>" |
| 6030 | + "html": "<p>Let <var>state</var> be <var>stream</var>.<a data-link-type=\"dfn\" href=\"https://streams.spec.whatwg.org/#writablestream-state\" id=\"ref-for-writablestream-state③③\">[[state]]</a>.</p>" |
6019 | 6031 | }, |
6020 | 6032 | { |
6021 | 6033 | "html": "<p class=\"assertion\">Assert: <var>state</var> is \"<code>writable</code>\" or \"<code>erroring</code>\".</p>" |
|
6045 | 6057 | "rationale": "if", |
6046 | 6058 | "steps": [ |
6047 | 6059 | { |
6048 | | - "html": "<p>If <var>stream</var>.<a data-link-type=\"dfn\" href=\"https://streams.spec.whatwg.org/#writablestream-state\" id=\"ref-for-writablestream-state③③\">[[state]]</a> is \"<code>writable</code>\", perform ! <a data-link-type=\"abstract-op\" href=\"https://streams.spec.whatwg.org/#writable-stream-default-controller-clear-algorithms\" id=\"ref-for-writable-stream-default-controller-clear-algorithms③\">WritableStreamDefaultControllerClearAlgorithms</a>(<var>controller</var>).</p>" |
| 6060 | + "html": "<p>If <var>stream</var>.<a data-link-type=\"dfn\" href=\"https://streams.spec.whatwg.org/#writablestream-state\" id=\"ref-for-writablestream-state③④\">[[state]]</a> is \"<code>writable</code>\", perform ! <a data-link-type=\"abstract-op\" href=\"https://streams.spec.whatwg.org/#writable-stream-default-controller-clear-algorithms\" id=\"ref-for-writable-stream-default-controller-clear-algorithms③\">WritableStreamDefaultControllerClearAlgorithms</a>(<var>controller</var>).</p>" |
6049 | 6061 | }, |
6050 | 6062 | { |
6051 | 6063 | "html": "<p>Perform ! <a data-link-type=\"abstract-op\" href=\"https://streams.spec.whatwg.org/#writable-stream-finish-in-flight-write-with-error\" id=\"ref-for-writable-stream-finish-in-flight-write-with-error\">WritableStreamFinishInFlightWriteWithError</a>(<var>stream</var>, <var>reason</var>).</p>" |
|
6076 | 6088 | ] |
6077 | 6089 | }, |
6078 | 6090 | { |
6079 | | - "html": "<p>Let <var>stream</var> be <var>controller</var>.<a data-link-type=\"dfn\" href=\"https://streams.spec.whatwg.org/#writablestreamdefaultcontroller-stream\" id=\"ref-for-writablestreamdefaultcontroller-stream⑦\">[[stream]]</a>.</p>" |
| 6091 | + "html": "<p>Let <var>stream</var> be <var>controller</var>.<a data-link-type=\"dfn\" href=\"https://streams.spec.whatwg.org/#writablestreamdefaultcontroller-stream\" id=\"ref-for-writablestreamdefaultcontroller-stream⑧\">[[stream]]</a>.</p>" |
6080 | 6092 | }, |
6081 | 6093 | { |
6082 | | - "html": "If ! <a data-link-type=\"abstract-op\" href=\"https://streams.spec.whatwg.org/#writable-stream-close-queued-or-in-flight\" id=\"ref-for-writable-stream-close-queued-or-in-flight①①\">WritableStreamCloseQueuedOrInFlight</a>(<var>stream</var>) is false and <var>stream</var>.<a data-link-type=\"dfn\" href=\"https://streams.spec.whatwg.org/#writablestream-state\" id=\"ref-for-writablestream-state③④\">[[state]]</a> is \"<code>writable</code>\",", |
| 6094 | + "html": "If ! <a data-link-type=\"abstract-op\" href=\"https://streams.spec.whatwg.org/#writable-stream-close-queued-or-in-flight\" id=\"ref-for-writable-stream-close-queued-or-in-flight①①\">WritableStreamCloseQueuedOrInFlight</a>(<var>stream</var>) is false and <var>stream</var>.<a data-link-type=\"dfn\" href=\"https://streams.spec.whatwg.org/#writablestream-state\" id=\"ref-for-writablestream-state③⑤\">[[state]]</a> is \"<code>writable</code>\",", |
6083 | 6095 | "rationale": "let", |
6084 | 6096 | "steps": [ |
6085 | 6097 | { |
|
6592 | 6604 | "rationale": ".algorithm", |
6593 | 6605 | "steps": [ |
6594 | 6606 | { |
6595 | | - "html": "<p class=\"assertion\">Assert: <var>stream</var>.<a data-link-type=\"dfn\" href=\"https://streams.spec.whatwg.org/#transformstream-writable\" id=\"ref-for-transformstream-writable⑥\">[[writable]]</a>.<a data-link-type=\"dfn\" href=\"https://streams.spec.whatwg.org/#writablestream-state\" id=\"ref-for-writablestream-state③⑤\">[[state]]</a> is \"<code>writable</code>\".</p>" |
| 6607 | + "html": "<p class=\"assertion\">Assert: <var>stream</var>.<a data-link-type=\"dfn\" href=\"https://streams.spec.whatwg.org/#transformstream-writable\" id=\"ref-for-transformstream-writable⑥\">[[writable]]</a>.<a data-link-type=\"dfn\" href=\"https://streams.spec.whatwg.org/#writablestream-state\" id=\"ref-for-writablestream-state③⑥\">[[state]]</a> is \"<code>writable</code>\".</p>" |
6596 | 6608 | }, |
6597 | 6609 | { |
6598 | 6610 | "html": "<p>Let <var>controller</var> be <var>stream</var>.<a data-link-type=\"dfn\" href=\"https://streams.spec.whatwg.org/#transformstream-controller\" id=\"ref-for-transformstream-controller⑦\">[[controller]]</a>.</p>" |
|
6615 | 6627 | "html": "<p>Let <var>writable</var> be <var>stream</var>.<a data-link-type=\"dfn\" href=\"https://streams.spec.whatwg.org/#transformstream-writable\" id=\"ref-for-transformstream-writable⑦\">[[writable]]</a>.</p>" |
6616 | 6628 | }, |
6617 | 6629 | { |
6618 | | - "html": "<p>Let <var>state</var> be <var>writable</var>.<a data-link-type=\"dfn\" href=\"https://streams.spec.whatwg.org/#writablestream-state\" id=\"ref-for-writablestream-state③⑥\">[[state]]</a>.</p>" |
| 6630 | + "html": "<p>Let <var>state</var> be <var>writable</var>.<a data-link-type=\"dfn\" href=\"https://streams.spec.whatwg.org/#writablestream-state\" id=\"ref-for-writablestream-state③⑦\">[[state]]</a>.</p>" |
6619 | 6631 | }, |
6620 | 6632 | { |
6621 | 6633 | "html": "<p>If <var>state</var> is \"<code>erroring</code>\", throw <var>writable</var>.<a data-link-type=\"dfn\" href=\"https://streams.spec.whatwg.org/#writablestream-storederror\" id=\"ref-for-writablestream-storederror①⑥\">[[storedError]]</a>.</p>" |
|
6804 | 6816 | "rationale": "if", |
6805 | 6817 | "steps": [ |
6806 | 6818 | { |
6807 | | - "html": "<p>If <var>writable</var>.<a data-link-type=\"dfn\" href=\"https://streams.spec.whatwg.org/#writablestream-state\" id=\"ref-for-writablestream-state③⑦\">[[state]]</a> is \"<code>errored</code>\", <a data-link-type=\"dfn\" href=\"https://webidl.spec.whatwg.org/#reject\" id=\"ref-for-reject②⓪\">reject</a> <var>controller</var>.<a data-link-type=\"dfn\" href=\"https://streams.spec.whatwg.org/#transformstreamdefaultcontroller-finishpromise\" id=\"ref-for-transformstreamdefaultcontroller-finishpromise①⑦\">[[finishPromise]]</a> with <var>writable</var>.<a data-link-type=\"dfn\" href=\"https://streams.spec.whatwg.org/#writablestream-storederror\" id=\"ref-for-writablestream-storederror①⑦\">[[storedError]]</a>.</p>" |
| 6819 | + "html": "<p>If <var>writable</var>.<a data-link-type=\"dfn\" href=\"https://streams.spec.whatwg.org/#writablestream-state\" id=\"ref-for-writablestream-state③⑧\">[[state]]</a> is \"<code>errored</code>\", <a data-link-type=\"dfn\" href=\"https://webidl.spec.whatwg.org/#reject\" id=\"ref-for-reject②⓪\">reject</a> <var>controller</var>.<a data-link-type=\"dfn\" href=\"https://streams.spec.whatwg.org/#transformstreamdefaultcontroller-finishpromise\" id=\"ref-for-transformstreamdefaultcontroller-finishpromise①⑦\">[[finishPromise]]</a> with <var>writable</var>.<a data-link-type=\"dfn\" href=\"https://streams.spec.whatwg.org/#writablestream-storederror\" id=\"ref-for-writablestream-storederror①⑦\">[[storedError]]</a>.</p>" |
6808 | 6820 | }, |
6809 | 6821 | { |
6810 | 6822 | "html": "Otherwise:", |
|
0 commit comments