Commit b7f5172d authored by Frank Tang's avatar Frank Tang Committed by Commit Bot

Add UsageCounters for misc Intl features

Track misc features launched in 2019 to understand the impact.
Also measure the v8BreakIterator usage of 'word' and 'line'
to lobby the need for 'line' in the replacement standard Intl.Segmenter.

Depending on https://chromium-review.googlesource.com/c/v8/v8/+/2067512

Bug: v8:10251
Change-Id: Ied744dc947986b4cdbec3f70c3eb6299cd58599c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2078903Reviewed-by: default avatarNate Chapin <japhet@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#746590}
parent 22ecdb41
...@@ -2512,6 +2512,11 @@ enum WebFeature { ...@@ -2512,6 +2512,11 @@ enum WebFeature {
kCryptoAlgorithmEd25519 = 3170, kCryptoAlgorithmEd25519 = 3170,
kCryptoAlgorithmX25519 = 3171, kCryptoAlgorithmX25519 = 3171,
kDisplayNames = 3172, kDisplayNames = 3172,
kNumberFormatStyleUnit = 3173,
kDateTimeFormatRange = 3174,
kDateTimeFormatDateTimeStyle = 3175,
kBreakIteratorTypeWord = 3176,
kBreakIteratorTypeLine = 3177,
// Add new features immediately above this line. Don't change assigned // Add new features immediately above this line. Don't change assigned
// numbers of any item, and don't reuse removed slots. // numbers of any item, and don't reuse removed slots.
......
...@@ -252,6 +252,21 @@ void UseCounterCallback(v8::Isolate* isolate, ...@@ -252,6 +252,21 @@ void UseCounterCallback(v8::Isolate* isolate,
case v8::Isolate::kDisplayNames: case v8::Isolate::kDisplayNames:
blink_feature = WebFeature::kDisplayNames; blink_feature = WebFeature::kDisplayNames;
break; break;
case v8::Isolate::kNumberFormatStyleUnit:
blink_feature = WebFeature::kNumberFormatStyleUnit;
break;
case v8::Isolate::kDateTimeFormatRange:
blink_feature = WebFeature::kDateTimeFormatRange;
break;
case v8::Isolate::kDateTimeFormatDateTimeStyle:
blink_feature = WebFeature::kDateTimeFormatDateTimeStyle;
break;
case v8::Isolate::kBreakIteratorTypeWord:
blink_feature = WebFeature::kBreakIteratorTypeWord;
break;
case v8::Isolate::kBreakIteratorTypeLine:
blink_feature = WebFeature::kBreakIteratorTypeLine;
break;
default: default:
// This can happen if V8 has added counters that this version of Blink // This can happen if V8 has added counters that this version of Blink
// does not know about. It's harmless. // does not know about. It's harmless.
......
...@@ -26720,6 +26720,11 @@ to ensure that the crash string is shown properly on the user-facing crash UI. ...@@ -26720,6 +26720,11 @@ to ensure that the crash string is shown properly on the user-facing crash UI.
<int value="3170" label="CryptoAlgorithmEd25519"/> <int value="3170" label="CryptoAlgorithmEd25519"/>
<int value="3171" label="CryptoAlgorithmX25519"/> <int value="3171" label="CryptoAlgorithmX25519"/>
<int value="3172" label="DisplayNames"/> <int value="3172" label="DisplayNames"/>
<int value="3173" label="NumberFormatStyleUnit"/>
<int value="3174" label="DateTimeFormatRange"/>
<int value="3175" label="DateTimeFormatDateTimeStyle"/>
<int value="3176" label="BreakIteratorTypeWord"/>
<int value="3177" label="BreakIteratorTypeLine"/>
</enum> </enum>
<enum name="FeaturePolicyAllowlistType"> <enum name="FeaturePolicyAllowlistType">
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment