Skip to content

Commit aa0b505

Browse files
committed
use framework laid out in whatwg#95
1 parent 9f3c5bf commit aa0b505

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

index.bs

+13-11
Original file line numberDiff line numberDiff line change
@@ -266,20 +266,20 @@ The <dfn attribute for=FileSystemHandle>name</dfn> getter steps are to return [=
266266
The <dfn method for=FileSystemHandle>remove(|options|)</dfn> method steps are:
267267

268268
1. Let |result| be [=a new promise=].
269+
1. Let |entry| be [=this=]'s [=FileSystemHandle/entry=].
269270
1. Run these steps [=in parallel=]:
270-
1. Let |access| be the result of running [=this=]'s
271-
[=FileSystemHandle/entry=]'s [=file system entry/request access=] given
272-
"`readwrite`".
273-
1. If |access| is not "{{PermissionState/granted}}", reject |result| with a
274-
"{{NotAllowedError}}" {{DOMException}} and abort.
271+
1. Let |access| be the result of running |entry|'s
272+
[=file system entry/request access=] given "`readwrite`".
273+
1. If |access| is not "{{PermissionState/granted}}":
274+
1. [=Queue a storage task=] given |entry|'s [=relevant global object=] to
275+
[=/reject=] |result| with a "{{NotAllowedError}}" {{DOMException}}.
276+
1. Abort these steps.
275277

276-
1. Let |entry| be [=this=]'s [=FileSystemHandle/entry=].
277-
1. Let |lockResult| be the result of [=file entry/lock/take|taking a lock=]
278-
with "`exclusive`" on |entry|.
279-
1. If |lockResult| is false, [=reject=] |result| with a
280-
"{{NoModificationAllowedError}}" {{DOMException}} and abort.
278+
1. Let |lockResultAlgorithm| be an algorithm which takes a |lockResult| and
279+
runs these steps:
280+
1. If |lockResult| is "`failure`", [=/reject=] |result| with a
281+
"{{NoModificationAllowedError}}" {{DOMException}} and abort.
281282

282-
1. [=Queue a task=] on the [=storage task source=] to run these steps:
283283
1. If |entry| does not exist in the underlying file system, [=/reject=]
284284
|result| with a "{{NotFoundError}}" {{DOMException}} and abort.
285285

@@ -307,6 +307,8 @@ The <dfn method for=FileSystemHandle>remove(|options|)</dfn> method steps are:
307307
Issue(68): Better specify what possible exceptions this could throw.
308308
1. [=/Resolve=] |result| with `undefined`.
309309

310+
1. [=file entry/lock/take|Take a lock=] with "`exclusive`" on |entry| and with
311+
|lockResultAlgorithm|.
310312
1. Return |result|.
311313

312314
Issue(39): Better specify what happens to a removed handle.

0 commit comments

Comments
 (0)