Commit b328bf7
committed
lib,src: implement QuotaExceededError as DOMException-derived interface
Implement QuotaExceededError as a DOMException-derived interface per the
WebIDL specification update.
QuotaExceededError is now a proper constructor exposed as a global
[Exposed=*] interface that extends DOMException with optional `quota`
and `requested` attributes (both nullable doubles, defaulting to null).
The constructor validates that quota and requested are finite,
non-negative, and that requested is not less than quota when both are
provided.
QuotaExceededError is [Serializable] and supports structuredClone,
preserving the quota and requested values across the serialization
boundary.
Callers updated:
- crypto.getRandomValues() now throws a QuotaExceededError instance
- WebStorage (C++) now constructs QuotaExceededError directly
Refs: https://redirect.github.com/whatwg/webidl/pull/1465
Fixes: #58987
PR-URL: #62293
Reviewed-By: Mattias Buelens <mattias@buelens.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>1 parent 4ee467f commit b328bf7Copy full SHA for b328bf7
15 files changed
+376-75Lines changed: 376 additions & 75 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- doc/api
- lib
- internal
- bootstrap/web
- crypto
- per_context
- worker
- src
- test
- common
- parallel
- wpt/status
Expand file treeCollapse file tree
Open diff view settings
Collapse file
+8Lines changed: 8 additions & 0 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
976 | 976 | |
977 | 977 | |
978 | 978 | |
| 979 | + |
| 980 | + |
| 981 | + |
| 982 | + |
| 983 | + |
| 984 | + |
| 985 | + |
| 986 | + |
979 | 987 | |
980 | 988 | |
981 | 989 | |
|
Collapse file
+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
130 | 130 | |
131 | 131 | |
132 | 132 | |
| 133 | + |
133 | 134 | |
134 | 135 | |
135 | 136 | |
|
Collapse file
lib/eslint.config_partial.mjs
Copy file name to clipboardExpand all lines: lib/eslint.config_partial.mjs+5-1Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
23 | 23 | |
24 | 24 | |
25 | 25 | |
26 | | - |
| 26 | + |
27 | 27 | |
28 | 28 | |
29 | 29 | |
| ||
122 | 122 | |
123 | 123 | |
124 | 124 | |
| 125 | + |
| 126 | + |
| 127 | + |
| 128 | + |
125 | 129 | |
126 | 130 | |
127 | 131 | |
|
Collapse file
lib/internal/bootstrap/web/exposed-wildcard.js
Copy file name to clipboardExpand all lines: lib/internal/bootstrap/web/exposed-wildcard.js+5Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
29 | 29 | |
30 | 30 | |
31 | 31 | |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
32 | 37 | |
33 | 38 | |
34 | 39 | |
|
Collapse file
lib/internal/crypto/random.js
Copy file name to clipboardExpand all lines: lib/internal/crypto/random.js+3-3Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
328 | 328 | |
329 | 329 | |
330 | 330 | |
331 | | - |
332 | | - |
333 | | - |
| 331 | + |
| 332 | + |
| 333 | + |
334 | 334 | |
335 | 335 | |
336 | 336 | |
|
Collapse file
lib/internal/per_context/domexception.js
Copy file name to clipboardExpand all lines: lib/internal/per_context/domexception.js+91Lines changed: 91 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
3 | 3 | |
4 | 4 | |
5 | 5 | |
| 6 | + |
| 7 | + |
6 | 8 | |
7 | 9 | |
8 | 10 | |
| 11 | + |
9 | 12 | |
10 | 13 | |
11 | 14 | |
| ||
203 | 206 | |
204 | 207 | |
205 | 208 | |
| 209 | + |
| 210 | + |
| 211 | + |
| 212 | + |
| 213 | + |
| 214 | + |
| 215 | + |
| 216 | + |
| 217 | + |
| 218 | + |
| 219 | + |
| 220 | + |
| 221 | + |
| 222 | + |
| 223 | + |
| 224 | + |
| 225 | + |
| 226 | + |
| 227 | + |
| 228 | + |
| 229 | + |
| 230 | + |
| 231 | + |
| 232 | + |
| 233 | + |
| 234 | + |
| 235 | + |
| 236 | + |
| 237 | + |
| 238 | + |
| 239 | + |
| 240 | + |
| 241 | + |
| 242 | + |
| 243 | + |
| 244 | + |
| 245 | + |
| 246 | + |
| 247 | + |
| 248 | + |
| 249 | + |
| 250 | + |
| 251 | + |
| 252 | + |
| 253 | + |
| 254 | + |
| 255 | + |
| 256 | + |
| 257 | + |
| 258 | + |
| 259 | + |
| 260 | + |
| 261 | + |
| 262 | + |
| 263 | + |
| 264 | + |
| 265 | + |
| 266 | + |
| 267 | + |
| 268 | + |
| 269 | + |
| 270 | + |
| 271 | + |
| 272 | + |
| 273 | + |
| 274 | + |
| 275 | + |
| 276 | + |
| 277 | + |
| 278 | + |
| 279 | + |
| 280 | + |
| 281 | + |
| 282 | + |
| 283 | + |
| 284 | + |
| 285 | + |
| 286 | + |
| 287 | + |
| 288 | + |
| 289 | + |
| 290 | + |
| 291 | + |
| 292 | + |
| 293 | + |
| 294 | + |
| 295 | + |
| 296 | + |
Collapse file
lib/internal/worker/clone_dom_exception.js
Copy file name to clipboard+4-2Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | 2 | |
3 | | - |
| 3 | + |
| 4 | + |
4 | 5 | |
5 | | - |
| 6 | + |
| 7 | + |
6 | 8 | |
Collapse file
+15Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1762 | 1762 | |
1763 | 1763 | |
1764 | 1764 | |
| 1765 | + |
| 1766 | + |
| 1767 | + |
| 1768 | + |
| 1769 | + |
| 1770 | + |
| 1771 | + |
| 1772 | + |
| 1773 | + |
| 1774 | + |
| 1775 | + |
| 1776 | + |
| 1777 | + |
| 1778 | + |
| 1779 | + |
1765 | 1780 | |
1766 | 1781 | |
1767 | 1782 | |
|
Collapse file
+9-9Lines changed: 9 additions & 9 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
57 | 57 | |
58 | 58 | |
59 | 59 | |
60 | | - |
61 | | - |
| 60 | + |
| 61 | + |
62 | 62 | |
63 | 63 | |
64 | 64 | |
65 | | - |
| 65 | + |
66 | 66 | |
67 | | - |
68 | | - |
| 67 | + |
| 68 | + |
69 | 69 | |
70 | 70 | |
71 | | - |
72 | | - |
73 | | - |
| 71 | + |
| 72 | + |
| 73 | + |
74 | 74 | |
75 | 75 | |
76 | | - |
| 76 | + |
77 | 77 | |
78 | 78 | |
79 | 79 | |
|
Collapse file
+1Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
79 | 79 | |
80 | 80 | |
81 | 81 | |
| 82 | + |
82 | 83 | |
83 | 84 | |
84 | 85 | |
|
0 commit comments