Commit e74d0f4
[api] add v8::Isolate::GetDefaultLocale()
This allows embedders to query the default locale used by Intl
APIs.
This information is already available to user land via
Intl?.Collator().resolvedOptions().locale, the issue with this
is that it's a lot slower and requires dynamic access to Intl
API, which is subject to patching and prototype pollution so it's
not as reliable for embedders than having a V8 API to query
the default locale directly.
Refs: nodejs/node#54279
Change-Id: I5a1823993c9ae79f8f61f54c6464daf882a09ba3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5772938
Reviewed-by: Leszek Swirski <[email protected]>
Commit-Queue: Joyee Cheung <[email protected]>
Cr-Commit-Position: refs/heads/main@{#95678}1 parent 9e9e1ee commit e74d0f4
2 files changed
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
1723 | 1724 | | |
1724 | 1725 | | |
1725 | 1726 | | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
1726 | 1733 | | |
1727 | 1734 | | |
1728 | 1735 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10774 | 10774 | | |
10775 | 10775 | | |
10776 | 10776 | | |
| 10777 | + | |
| 10778 | + | |
| 10779 | + | |
| 10780 | + | |
| 10781 | + | |
| 10782 | + | |
| 10783 | + | |
| 10784 | + | |
| 10785 | + | |
| 10786 | + | |
| 10787 | + | |
10777 | 10788 | | |
10778 | 10789 | | |
10779 | 10790 | | |
| |||
0 commit comments