Commit be644e2
src: throw RangeError on failed ArrayBuffer BackingStore allocation
This also updates `ERR_MEMORY_ALLOCATION_FAILED` to be a RangeError,
aligning with V8's OutOfMemory error type.
PR-URL: #61480
Refs: https://github.com/nodejs/node/blob/c755b0113ce0cb6d83baf2cf070ba381a5673db2/deps/v8/src/builtins/builtins-typed-array.cc#L584
Refs: https://tc39.es/ecma262/#sec-sharedarraybuffer.prototype.grow
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>1 parent eedd3bb commit be644e2Copy full SHA for be644e2
4 files changed
+53-15Lines changed: 53 additions & 15 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- src
Expand file treeCollapse file tree
Open diff view settings
Collapse file
+9-2Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
17 | 17 | |
18 | 18 | |
19 | 19 | |
| 20 | + |
20 | 21 | |
21 | 22 | |
22 | 23 | |
| ||
317 | 318 | |
318 | 319 | |
319 | 320 | |
320 | | - |
| 321 | + |
| 322 | + |
| 323 | + |
| 324 | + |
321 | 325 | |
322 | | - |
| 326 | + |
| 327 | + |
| 328 | + |
| 329 | + |
323 | 330 | |
324 | 331 | |
325 | 332 | |
|
Collapse file
+9-1Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
22 | 22 | |
23 | 23 | |
24 | 24 | |
| 25 | + |
25 | 26 | |
26 | 27 | |
27 | 28 | |
| ||
83 | 84 | |
84 | 85 | |
85 | 86 | |
86 | | - |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | + |
| 91 | + |
| 92 | + |
| 93 | + |
| 94 | + |
87 | 95 | |
88 | 96 | |
89 | 97 | |
|
Collapse file
+34-11Lines changed: 34 additions & 11 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
59 | 59 | |
60 | 60 | |
61 | 61 | |
| 62 | + |
62 | 63 | |
63 | 64 | |
64 | 65 | |
| ||
304 | 305 | |
305 | 306 | |
306 | 307 | |
307 | | - |
308 | | - |
| 308 | + |
309 | 309 | |
310 | 310 | |
311 | 311 | |
312 | 312 | |
313 | | - |
| 313 | + |
| 314 | + |
| 315 | + |
| 316 | + |
| 317 | + |
314 | 318 | |
315 | 319 | |
316 | 320 | |
317 | | - |
| 321 | + |
318 | 322 | |
319 | 323 | |
320 | 324 | |
| ||
329 | 333 | |
330 | 334 | |
331 | 335 | |
332 | | - |
| 336 | + |
| 337 | + |
| 338 | + |
| 339 | + |
| 340 | + |
| 341 | + |
| 342 | + |
| 343 | + |
333 | 344 | |
334 | 345 | |
335 | 346 | |
| ||
372 | 383 | |
373 | 384 | |
374 | 385 | |
375 | | - |
| 386 | + |
| 387 | + |
| 388 | + |
| 389 | + |
| 390 | + |
| 391 | + |
| 392 | + |
| 393 | + |
376 | 394 | |
377 | 395 | |
378 | 396 | |
| ||
412 | 430 | |
413 | 431 | |
414 | 432 | |
415 | | - |
416 | | - |
417 | | - |
| 433 | + |
| 434 | + |
| 435 | + |
| 436 | + |
| 437 | + |
| 438 | + |
| 439 | + |
| 440 | + |
418 | 441 | |
419 | 442 | |
420 | 443 | |
| ||
1449 | 1472 | |
1450 | 1473 | |
1451 | 1474 | |
1452 | | - |
1453 | | - |
| 1475 | + |
| 1476 | + |
1454 | 1477 | |
1455 | 1478 | |
1456 | 1479 | |
|
Collapse file
+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
106 | 106 | |
107 | 107 | |
108 | 108 | |
109 | | - |
| 109 | + |
110 | 110 | |
111 | 111 | |
112 | 112 | |
|
0 commit comments