@@ -266,20 +266,20 @@ The <dfn attribute for=FileSystemHandle>name</dfn> getter steps are to return [=
266
266
The <dfn method for=FileSystemHandle>remove(|options|)</dfn> method steps are:
267
267
268
268
1. Let |result| be [=a new promise=] .
269
+ 1. Let |entry| be [=this=] 's [=FileSystemHandle/entry=] .
269
270
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.
275
277
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.
281
282
282
- 1. [=Queue a task=] on the [=storage task source=] to run these steps:
283
283
1. If |entry| does not exist in the underlying file system, [=/reject=]
284
284
|result| with a "{{NotFoundError}} " {{DOMException}} and abort.
285
285
@@ -307,6 +307,8 @@ The <dfn method for=FileSystemHandle>remove(|options|)</dfn> method steps are:
307
307
Issue(68): Better specify what possible exceptions this could throw.
308
308
1. [=/Resolve=] |result| with `undefined`.
309
309
310
+ 1. [=file entry/lock/take|Take a lock=] with "`exclusive`" on |entry| and with
311
+ |lockResultAlgorithm|.
310
312
1. Return |result|.
311
313
312
314
Issue(39): Better specify what happens to a removed handle.
0 commit comments