Commit de6f1f5
src: initialize ICU version in per_process::metadata.versions
Instead of
- Initialize the ICU versions in JS land after consulting
internalBinding('config').hasIntl
- Joining the version keys in C++
- Splitting the keys in JS and call into C++ again to get the value for
each of the keys
Do:
- Guard the initialization code behind `NODE_HAVE_I18N_SUPPORT`
- Do the initialization in C++ right after ICU data is loaded
- Initialize each version directly using ICU functions/constants,
and put them in per_process::metadata.versions. These will be
copied into `process.versions` naturally later.
This way, the initialization of the versions won't be called
in worker threads again.
PR-URL: #25115
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent e5b4af4 commit de6f1f5Copy full SHA for de6f1f5
File tree
Expand file treeCollapse file tree
5 files changed
+61
-85
lines changedOpen diff view settings
Filter options
- lib/internal/bootstrap
- src
Expand file treeCollapse file tree
5 files changed
+61
-85
lines changedOpen diff view settings
Collapse file
lib/internal/bootstrap/node.js
Copy file name to clipboardExpand all lines: lib/internal/bootstrap/node.js-21Lines changed: 0 additions & 21 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
39 | 39 | |
40 | 40 | |
41 | 41 | |
42 | | - |
43 | | - |
44 | 42 | |
45 | 43 | |
46 | 44 | |
| ||
647 | 645 | |
648 | 646 | |
649 | 647 | |
650 | | - |
651 | | - |
652 | | - |
653 | | - |
654 | | - |
655 | | - |
656 | | - |
657 | | - |
658 | | - |
659 | | - |
660 | | - |
661 | | - |
662 | | - |
663 | | - |
664 | | - |
665 | | - |
666 | | - |
667 | | - |
668 | | - |
669 | 648 | |
670 | 649 | |
671 | 650 | |
|
Collapse file
+5-1Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
880 | 880 | |
881 | 881 | |
882 | 882 | |
883 | | - |
| 883 | + |
| 884 | + |
| 885 | + |
| 886 | + |
884 | 887 | |
885 | 888 | |
886 | 889 | |
| ||
1672 | 1675 | |
1673 | 1676 | |
1674 | 1677 | |
| 1678 | + |
1675 | 1679 | |
1676 | 1680 | |
1677 | 1681 | |
|
Collapse file
-62Lines changed: 0 additions & 62 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
510 | 510 | |
511 | 511 | |
512 | 512 | |
513 | | - |
514 | | - |
515 | | - |
516 | | - |
517 | | - |
518 | | - |
519 | | - |
520 | | - |
521 | | - |
522 | | - |
523 | | - |
524 | | - |
525 | | - |
526 | | - |
527 | | - |
528 | | - |
529 | | - |
530 | | - |
531 | | - |
532 | | - |
533 | | - |
534 | | - |
535 | | - |
536 | | - |
537 | | - |
538 | | - |
539 | | - |
540 | | - |
541 | | - |
542 | | - |
543 | | - |
544 | | - |
545 | | - |
546 | | - |
547 | | - |
548 | | - |
549 | | - |
550 | | - |
551 | | - |
552 | | - |
553 | | - |
554 | | - |
555 | | - |
556 | | - |
557 | | - |
558 | | - |
559 | | - |
560 | | - |
561 | | - |
562 | | - |
563 | | - |
564 | | - |
565 | | - |
566 | | - |
567 | | - |
568 | | - |
569 | | - |
570 | | - |
571 | | - |
572 | | - |
573 | | - |
574 | 513 | |
575 | 514 | |
576 | 515 | |
| ||
868 | 807 | |
869 | 808 | |
870 | 809 | |
871 | | - |
872 | 810 | |
873 | 811 | |
874 | 812 | |
|
Collapse file
+31Lines changed: 31 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
12 | 12 | |
13 | 13 | |
14 | 14 | |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
15 | 22 | |
16 | 23 | |
17 | 24 | |
| ||
35 | 42 | |
36 | 43 | |
37 | 44 | |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
38 | 64 | |
39 | 65 | |
40 | 66 | |
| ||
57 | 83 | |
58 | 84 | |
59 | 85 | |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | + |
60 | 91 | |
61 | 92 | |
62 | 93 | |
Collapse file
+25-1Lines changed: 25 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
26 | 26 | |
27 | 27 | |
28 | 28 | |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
29 | 39 | |
30 | 40 | |
31 | | - |
| 41 | + |
| 42 | + |
32 | 43 | |
33 | 44 | |
34 | 45 | |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
35 | 52 | |
36 | 53 | |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
37 | 61 | |
38 | 62 | |
39 | 63 | |
|
0 commit comments