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

[Intl] Fix resolvedOptions of PluralRule

Bug: v8:9727
Change-Id: I634902e89c0c79fb95994e0a3a971cbc7889c09c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1803788
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63816}
parent 133219ad
...@@ -241,17 +241,18 @@ Handle<JSObject> JSPluralRules::ResolvedOptions( ...@@ -241,17 +241,18 @@ Handle<JSObject> JSPluralRules::ResolvedOptions(
JSNumberFormat::MinimumIntegerDigitsFromSkeleton(skeleton), JSNumberFormat::MinimumIntegerDigitsFromSkeleton(skeleton),
"minimumIntegerDigits"); "minimumIntegerDigits");
int32_t min = 0, max = 0; int32_t min = 0, max = 0;
JSNumberFormat::FractionDigitsFromSkeleton(skeleton, &min, &max);
CreateDataPropertyForOptions(isolate, options, min, "minimumFractionDigits");
CreateDataPropertyForOptions(isolate, options, max, "maximumFractionDigits");
if (JSNumberFormat::SignificantDigitsFromSkeleton(skeleton, &min, &max)) { if (JSNumberFormat::SignificantDigitsFromSkeleton(skeleton, &min, &max)) {
CreateDataPropertyForOptions(isolate, options, min, CreateDataPropertyForOptions(isolate, options, min,
"minimumSignificantDigits"); "minimumSignificantDigits");
CreateDataPropertyForOptions(isolate, options, max, CreateDataPropertyForOptions(isolate, options, max,
"maximumSignificantDigits"); "maximumSignificantDigits");
} else {
JSNumberFormat::FractionDigitsFromSkeleton(skeleton, &min, &max);
CreateDataPropertyForOptions(isolate, options, min,
"minimumFractionDigits");
CreateDataPropertyForOptions(isolate, options, max,
"maximumFractionDigits");
} }
// 6. Let pluralCategories be a List of Strings representing the // 6. Let pluralCategories be a List of Strings representing the
......
...@@ -538,7 +538,6 @@ ...@@ -538,7 +538,6 @@
'intl402/Locale/constructor-tag': [FAIL], 'intl402/Locale/constructor-tag': [FAIL],
'intl402/Locale/getters': [FAIL], 'intl402/Locale/getters': [FAIL],
'intl402/Locale/likely-subtags-grandfathered': [FAIL], 'intl402/Locale/likely-subtags-grandfathered': [FAIL],
'intl402/PluralRules/prototype/resolvedOptions/order': [FAIL],
######################## NEEDS INVESTIGATION ########################### ######################## NEEDS INVESTIGATION ###########################
......
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