Changeset 278697 in webkit
- Timestamp:
- Jun 10, 2021 1:06:59 AM (14 months ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
runtime/IntlNumberFormat.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r278696 r278697 1 2021-06-10 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] Ignore Intl.NumberFormat feature options when linked-ICU is old 4 https://bugs.webkit.org/show_bug.cgi?id=226861 5 rdar://77393100 6 7 Reviewed by Ross Kirsling. 8 9 Let's just ignore the option when Intl.NumberFormat features cannot be implemented since the linked ICU is old. 10 There is no way not to expose these features since Intl.NumberFormat's these changes are additional ones and Intl.NumberFormat existed before. 11 12 * runtime/IntlNumberFormat.cpp: 13 (JSC::IntlNumberFormat::initializeNumberFormat): 14 1 15 2021-06-09 Ross Kirsling <ross.kirsling@sony.com> 2 16 -
trunk/Source/JavaScriptCore/runtime/IntlNumberFormat.cpp
r278253 r278697 546 546 break; 547 547 case CurrencyDisplay::NarrowSymbol: 548 throwTypeError(globalObject, scope, "Failed to initialize NumberFormat since used feature is not supported in the linked ICU version"_s);549 return;548 style = UNUM_CURRENCY; // Use the same option to "symbol" since linked-ICU does not support it. 549 break; 550 550 case CurrencyDisplay::Name: 551 551 style = UNUM_CURRENCY_PLURAL; … … 556 556 break; 557 557 case CurrencySign::Accounting: 558 throwTypeError(globalObject, scope, "Failed to initialize NumberFormat since used feature is not supported in the linked ICU version"_s);559 return;558 // Ignore this case since linked ICU does not support it. 559 break; 560 560 } 561 561 break; 562 562 case Style::Unit: 563 throwTypeError(globalObject, scope, "Failed to initialize NumberFormat since used feature is not supported in the linked ICU version"_s);564 return;563 // Ignore this case since linked ICU does not support it. 564 break; 565 565 } 566 566 … … 571 571 case IntlNotation::Engineering: 572 572 case IntlNotation::Compact: 573 throwTypeError(globalObject, scope, "Failed to initialize NumberFormat since used feature is not supported in the linked ICU version"_s);574 return;573 // Ignore this case since linked ICU does not support it. 574 break; 575 575 } 576 576 … … 581 581 case SignDisplay::Always: 582 582 case SignDisplay::ExceptZero: 583 throwTypeError(globalObject, scope, "Failed to initialize NumberFormat since used feature is not supported in the linked ICU version"_s);584 return;583 // Ignore this case since linked ICU does not support it. 584 break; 585 585 } 586 586 … … 612 612 break; 613 613 case IntlRoundingType::CompactRounding: 614 throwTypeError(globalObject, scope, "Failed to initialize NumberFormat since used feature is not supported in the linked ICU version"_s);615 return;614 // Ignore this case since linked ICU does not support it. 615 break; 616 616 } 617 617 unum_setAttribute(m_numberFormat.get(), UNUM_GROUPING_USED, m_useGrouping);
Note: See TracChangeset
for help on using the changeset viewer.