Commit 9b4eec0
committed
src: allow not materializing ArrayBuffers from C++
Where appropriate, use a helper that wraps around
`ArrayBufferView::Buffer()` or `ArrayBufferView::CopyContents()`
rather than `Buffer::Data()`, as that may help to avoid materializing
the underlying `ArrayBuffer` when reading small typed arrays from C++.
This allows keeping the performance benefits of the faster creation of
heap-allocated small typed arrays in many cases.
PR-URL: #26301
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent e2baa68 commit 9b4eec0Copy full SHA for 9b4eec0
File tree
Expand file treeCollapse file tree
8 files changed
+183
-145
lines changedOpen diff view settings
Filter options
- src
Expand file treeCollapse file tree
8 files changed
+183
-145
lines changedOpen diff view settings
Collapse file
+107-120Lines changed: 107 additions & 120 deletions
Large diffs are not rendered by default.
Collapse file
+3-4Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
333 | 333 | |
334 | 334 | |
335 | 335 | |
336 | | - |
| 336 | + |
337 | 337 | |
338 | 338 | |
339 | 339 | |
| ||
462 | 462 | |
463 | 463 | |
464 | 464 | |
465 | | - |
| 465 | + |
466 | 466 | |
467 | 467 | |
468 | 468 | |
| ||
803 | 803 | |
804 | 804 | |
805 | 805 | |
806 | | - |
807 | | - |
| 806 | + |
808 | 807 | |
809 | 808 | |
810 | 809 | |
|
Collapse file
+12-14Lines changed: 12 additions & 14 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
12 | 12 | |
13 | 13 | |
14 | 14 | |
| 15 | + |
15 | 16 | |
16 | 17 | |
17 | 18 | |
| ||
2483 | 2484 | |
2484 | 2485 | |
2485 | 2486 | |
2486 | | - |
| 2487 | + |
2487 | 2488 | |
2488 | 2489 | |
2489 | 2490 | |
| ||
2508 | 2509 | |
2509 | 2510 | |
2510 | 2511 | |
2511 | | - |
2512 | | - |
2513 | | - |
| 2512 | + |
2514 | 2513 | |
2515 | | - |
2516 | | - |
2517 | | - |
| 2514 | + |
| 2515 | + |
2518 | 2516 | |
2519 | 2517 | |
2520 | | - |
| 2518 | + |
2521 | 2519 | |
2522 | 2520 | |
2523 | 2521 | |
| ||
2772 | 2770 | |
2773 | 2771 | |
2774 | 2772 | |
2775 | | - |
2776 | | - |
2777 | | - |
2778 | | - |
| 2773 | + |
| 2774 | + |
| 2775 | + |
| 2776 | + |
2779 | 2777 | |
2780 | 2778 | |
2781 | 2779 | |
| ||
2800 | 2798 | |
2801 | 2799 | |
2802 | 2800 | |
2803 | | - |
| 2801 | + |
2804 | 2802 | |
2805 | 2803 | |
2806 | 2804 | |
| ||
2872 | 2870 | |
2873 | 2871 | |
2874 | 2872 | |
2875 | | - |
| 2873 | + |
2876 | 2874 | |
2877 | 2875 | |
2878 | 2876 | |
|
Collapse file
+3-2Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
699 | 699 | |
700 | 700 | |
701 | 701 | |
702 | | - |
| 702 | + |
| 703 | + |
703 | 704 | |
704 | 705 | |
705 | 706 | |
| ||
1089 | 1090 | |
1090 | 1091 | |
1091 | 1092 | |
1092 | | - |
| 1093 | + |
1093 | 1094 | |
1094 | 1095 | |
1095 | 1096 | |
|
Collapse file
+7-2Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
4 | 4 | |
5 | 5 | |
6 | 6 | |
| 7 | + |
7 | 8 | |
8 | 9 | |
9 | 10 | |
| ||
252 | 253 | |
253 | 254 | |
254 | 255 | |
255 | | - |
| 256 | + |
| 257 | + |
| 258 | + |
| 259 | + |
| 260 | + |
256 | 261 | |
257 | | - |
| 262 | + |
258 | 263 | |
259 | 264 | |
260 | 265 | |
|
Collapse file
+26Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
466 | 466 | |
467 | 467 | |
468 | 468 | |
| 469 | + |
| 470 | + |
| 471 | + |
| 472 | + |
| 473 | + |
| 474 | + |
| 475 | + |
| 476 | + |
| 477 | + |
| 478 | + |
| 479 | + |
| 480 | + |
| 481 | + |
| 482 | + |
| 483 | + |
| 484 | + |
| 485 | + |
| 486 | + |
| 487 | + |
| 488 | + |
| 489 | + |
| 490 | + |
| 491 | + |
| 492 | + |
| 493 | + |
| 494 | + |
469 | 495 | |
470 | 496 | |
471 | 497 | |
|
Collapse file
+4-3Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
29 | 29 | |
30 | 30 | |
31 | 31 | |
| 32 | + |
32 | 33 | |
33 | 34 | |
34 | 35 | |
| ||
89 | 90 | |
90 | 91 | |
91 | 92 | |
92 | | - |
93 | | - |
| 93 | + |
| 94 | + |
94 | 95 | |
95 | 96 | |
96 | | - |
| 97 | + |
97 | 98 | |
98 | 99 | |
99 | 100 | |
|
Collapse file
+21Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
417 | 417 | |
418 | 418 | |
419 | 419 | |
| 420 | + |
| 421 | + |
| 422 | + |
| 423 | + |
| 424 | + |
| 425 | + |
| 426 | + |
| 427 | + |
| 428 | + |
| 429 | + |
| 430 | + |
| 431 | + |
| 432 | + |
| 433 | + |
| 434 | + |
| 435 | + |
| 436 | + |
| 437 | + |
| 438 | + |
| 439 | + |
| 440 | + |
420 | 441 | |
421 | 442 | |
422 | 443 | |
|
0 commit comments