From 0ffc024f204d52be6c958a8fcc17fbb1d400e00d Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Tue, 8 Jul 2025 13:15:15 +0900 Subject: [PATCH] Update QuotaExceededError usage QuotaExceededError is graduating from being a DOMException name into a new error class, in https://github.com/whatwg/webidl/pull/1465. Update creation sites to reflect this. For now, the quota and requested properties are left at their default (null). Future work could include setting them in an informative fashion. --- index.bs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/index.bs b/index.bs index 881fb19..f53c59a 100644 --- a/index.bs +++ b/index.bs @@ -1266,8 +1266,8 @@ runs these steps: |head|, |data| and |tail|. 1. If the operations modifying |stream|'s [=[[buffer]]=] in the previous steps failed due to exceeding the [=storage quota=], - [=/reject=] |p| with a "{{QuotaExceededError}}" {{DOMException}} - and abort these steps, leaving |stream|'s [=[[buffer]]=] unmodified. + [=/reject=] |p| with a {{QuotaExceededError}} and abort these steps, + leaving |stream|'s [=[[buffer]]=] unmodified. Note: [=Storage quota=] only applies to files stored in a [=/bucket file system=]. @@ -1294,8 +1294,8 @@ runs these steps: concating |stream|'s [=[[buffer]]=] with a [=byte sequence=] containing |newSize|-|oldSize| `0x00` bytes. 1. If the operation in the previous step failed due to exceeding the [=storage quota=], - [=/reject=] |p| with a "{{QuotaExceededError}}" {{DOMException}} and - abort these steps, leaving |stream|'s [=[[buffer]]=] unmodified. + [=/reject=] |p| with a {{QuotaExceededError}} and abort these steps, + leaving |stream|'s [=[[buffer]]=] unmodified. Note: [=Storage quota=] only applies to files stored in a [=/bucket file system=]. @@ -1542,7 +1542,7 @@ The write(|buffer|, {{FileSystemReadW |oldSize| − (|writePosition| + |bufferSize|) bytes of |fileContents|. 1. Let |newSize| be |head|'s [=byte sequence/length=] + |bufferSize| + |tail|'s [=byte sequence/length=]. 1. If |newSize| − |oldSize| exceeds the available [=storage quota=], - [=throw=] a "{{QuotaExceededError}}" {{DOMException}}. + [=throw=] a {{QuotaExceededError}}. 1. Set [=this=]'s [=FileSystemSyncAccessHandle/[[file]]=]'s [=file entry/binary data=] to the concatenation of |head|, the contents of |buffer| and |tail|. @@ -1586,7 +1586,7 @@ The truncate(|newSize|) method |newSize|, [=throw=] a {{TypeError}}. 1. If |newSize| is larger than |oldSize|: 1. If |newSize| − |oldSize| exceeds the available [=storage quota=], - [=throw=] a "{{QuotaExceededError}}" {{DOMException}}. + [=throw=] a {{QuotaExceededError}}. 1. Set [=this=]'s [=FileSystemSyncAccessHandle/[[file]]=]'s to a [=byte sequence=] formed by concatenating |fileContents| with a [=byte sequence=] containing |newSize| − |oldSize| 0x00 bytes.