diff --git a/index.bs b/index.bs index c47f619..d7d019e 100644 --- a/index.bs +++ b/index.bs @@ -907,11 +907,8 @@ Similarly, when piping a {{ReadableStream}} into a {{FileSystemWritableFileStrea To create a new FileSystemWritableFileStream given a [=file entry=] |file| in a [=/Realm=] |realm|, perform the following steps: -1. Let |stream| be a new {{FileSystemWritableFileStream}} in |realm|. -1. Perform [$InitializeWritableStream$](|stream|) +1. Let |stream| be a [=new=] {{FileSystemWritableFileStream}} in |realm|. 1. Set |stream|.[=FileSystemWritableFileStream/[[file]]=] to |file|. -1. Let |controller| be a new {{WritableStreamDefaultController}}. -1. Let |startAlgorithm| be an algorithm that returns `undefined`. 1. Let |writeAlgorithm| be an algorithm which takes a |chunk| argument and returns the result of running the [=write a chunk=] algorithm with |stream| and |chunk|. 1. Let |closeAlgorithm| be the following steps: @@ -931,10 +928,13 @@ in a [=/Realm=] |realm|, perform the following steps: being written to. 1. [=/Resolve=] |closeResult| with `undefined`. 1. Return |closeResult|. -1. Let |abortAlgorithm| be an algorithm that returns [=a promise resolved with=] `undefined`. 1. Let |highWaterMark| be 1. 1. Let |sizeAlgorithm| be an algorithm that returns `1`. -1. Perform [$SetUpWritableStreamDefaultController$](|stream|, |controller|, |startAlgorithm|, |writeAlgorithm|, |closeAlgorithm|, |abortAlgorithm|, |highWaterMark|, |sizeAlgorithm|). +1. [=WritableStream/Set up=] |stream| with writeAlgorithm set to |writeAlgorithm|, closeAlgorithm set to |closeAlgorithm|, highWaterMark set to |highWaterMark|, and sizeAlgorithm set to |sizeAlgorithm|. 1. Return |stream|. @@ -1058,9 +1058,10 @@ runs these steps: The write(|data|) method, when invoked, must run these steps: -1. Let |writer| be the result of calling [$AcquireWritableStreamDefaultWriter$]([=this=]). -1. Let |result| be [$WritableStreamDefaultWriterWrite$](|writer|, |data|). -1. Perform [$WritableStreamDefaultWriterRelease$](|writer|). +1. Let |writer| be the result of [=WritableStream/getting a writer=] for [=this=]. +1. Let |result| be the result of [=WritableStreamDefaultWriter/writing a chunk=] to |writer| given + |data|. +1. [=WritableStreamDefaultWriter/Release=] |writer|. 1. Return |result|. @@ -1076,12 +1077,11 @@ these steps: The seek(|position|) method, when invoked, must run these steps: -1. Let |writer| be the result of calling [$AcquireWritableStreamDefaultWriter$]([=this=]). -1. Let |result| be [$WritableStreamDefaultWriterWrite$](|writer|, - {{{WriteParams/type}}: {{WriteCommandType/"seek"}}, - {{WriteParams/position}}: |position|, - {{WriteParams/size}}: undefined, {{WriteParams/data}}: undefined}). -1. Perform [$WritableStreamDefaultWriterRelease$](|writer|). +1. Let |writer| be the result of [=WritableStream/getting a writer=] for [=this=]. +1. Let |result| be the result of [=WritableStreamDefaultWriter/writing a chunk=] to |writer| given + «[ "{{WriteParams/type}}" → {{WriteCommandType/"seek"}}, "{{WriteParams/position}}" → + |position| ]». +1. [=WritableStreamDefaultWriter/Release=] |writer|. 1. Return |result|. @@ -1105,12 +1105,11 @@ steps: The truncate(|size|) method, when invoked, must run these steps: -1. Let |writer| be the result of calling [$AcquireWritableStreamDefaultWriter$]([=this=]). -1. Let |result| be [$WritableStreamDefaultWriterWrite$](|writer|, - {{{WriteParams/type}}: {{WriteCommandType/"truncate"}}, - {{WriteParams/size}}: |size|, - {{WriteParams/position}}: undefined, {{WriteParams/data}}: undefined}). -1. Perform [$WritableStreamDefaultWriterRelease$](|writer|). +1. Let |writer| be the result of [=WritableStream/getting a writer=] for [=this=]. +1. Let |result| be the result of [=WritableStreamDefaultWriter/writing a chunk=] to |writer| given + «[ "{{WriteParams/type}}" → {{WriteCommandType/"truncate"}}, "{{WriteParams/size}}" → + |size| ]». +1. [=WritableStreamDefaultWriter/Release=] |writer|. 1. Return |result|.