Changeset 287543 in webkit
- Timestamp:
- Jan 3, 2022 8:31:18 AM (7 months ago)
- Location:
- trunk
- Files:
-
- 7 edited
-
JSTests/ChangeLog (modified) (1 diff)
-
JSTests/stress/intl-numberformat-format-range-v3.js (modified) (1 diff)
-
JSTests/stress/intl-pluralrules-selectrange.js (modified) (1 diff)
-
JSTests/test262/expectations.yaml (modified) (2 diffs)
-
Source/JavaScriptCore/ChangeLog (modified) (1 diff)
-
Source/JavaScriptCore/runtime/IntlNumberFormatPrototype.cpp (modified) (1 diff)
-
Source/JavaScriptCore/runtime/IntlPluralRulesPrototype.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r287541 r287543 1 2022-01-03 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] Fix length of Intl.NumberFormat.formatRange and Intl.PluralRules.selectRange 4 https://bugs.webkit.org/show_bug.cgi?id=234806 5 6 Reviewed by Alexey Shvayka. 7 8 * stress/intl-numberformat-format-range-v3.js: 9 (nf.formatRange.nf.formatRangeToParts.methods.forEach): 10 * stress/intl-pluralrules-selectrange.js: 11 1 12 2022-01-03 Yusuke Suzuki <ysuzuki@apple.com> 2 13 -
trunk/JSTests/stress/intl-numberformat-format-range-v3.js
r286255 r287543 64 64 let f = nf[method]; 65 65 shouldThrow(() => { f(1, 23) }, TypeError); 66 shouldBe(f.length, 2); 66 67 67 68 // Assert normal call success -
trunk/JSTests/stress/intl-pluralrules-selectrange.js
r285418 r287543 33 33 if (Intl.PluralRules.prototype.selectRange) { 34 34 const pl = new Intl.PluralRules("sl"); 35 shouldBe(pl.selectRange.length, 2); 35 36 shouldBe("few", pl.selectRange(102, 201)); 36 37 } -
trunk/JSTests/test262/expectations.yaml
r287541 r287543 1387 1387 default: 'Test262Error: Expected SameValue(«1», «1.0000000000000001») to be true' 1388 1388 strict mode: 'Test262Error: Expected SameValue(«1», «1.0000000000000001») to be true' 1389 test/intl402/NumberFormat/prototype/formatRange/builtin.js: 1390 default: 'Test262Error: The [[Class]] internal property of a built-in function must be "Function". Expected SameValue(«[object Undefined]», «[object Function]») to be true' 1391 strict mode: 'Test262Error: The [[Class]] internal property of a built-in function must be "Function". Expected SameValue(«[object Undefined]», «[object Function]») to be true' 1392 test/intl402/NumberFormat/prototype/formatRange/en-US.js: 1393 default: "TypeError: nf.formatRange is not a function. (In 'nf.formatRange(3, 5)', 'nf.formatRange' is undefined)" 1394 strict mode: "TypeError: nf.formatRange is not a function. (In 'nf.formatRange(3, 5)', 'nf.formatRange' is undefined)" 1395 test/intl402/NumberFormat/prototype/formatRange/invoked-as-func.js: 1396 default: 'Test262Error: Expected SameValue(«undefined», «function») to be true' 1397 strict mode: 'Test262Error: Expected SameValue(«undefined», «function») to be true' 1389 1398 test/intl402/NumberFormat/prototype/formatRange/length.js: 1390 default: 'Test262Error: descriptor value should be 2' 1391 strict mode: 'Test262Error: descriptor value should be 2' 1399 default: "TypeError: undefined is not an object (evaluating 'Object.getOwnPropertyDescriptor(obj, name)')" 1400 strict mode: "TypeError: undefined is not an object (evaluating 'Object.getOwnPropertyDescriptor(obj, name)')" 1401 test/intl402/NumberFormat/prototype/formatRange/name.js: 1402 default: "TypeError: undefined is not an object (evaluating 'Object.getOwnPropertyDescriptor(obj, name)')" 1403 strict mode: "TypeError: undefined is not an object (evaluating 'Object.getOwnPropertyDescriptor(obj, name)')" 1404 test/intl402/NumberFormat/prototype/formatRange/nan-arguments-throws.js: 1405 default: 'Test262Error: Expected a RangeError but got a TypeError' 1406 strict mode: 'Test262Error: Expected a RangeError but got a TypeError' 1407 test/intl402/NumberFormat/prototype/formatRange/prop-desc.js: 1408 default: 'Test262Error: `typeof Intl.NumberFormat.prototype.formatRange` is `function` Expected SameValue(«undefined», «function») to be true' 1409 strict mode: 'Test262Error: `typeof Intl.NumberFormat.prototype.formatRange` is `function` Expected SameValue(«undefined», «function») to be true' 1392 1410 test/intl402/NumberFormat/prototype/formatRange/pt-PT.js: 1393 default: 'Test262Error: Expected SameValue(«3 - 5 €», «3 - 5 €») to be true' 1394 strict mode: 'Test262Error: Expected SameValue(«3 - 5 €», «3 - 5 €») to be true' 1411 default: "TypeError: nf.formatRange is not a function. (In 'nf.formatRange(3, 5)', 'nf.formatRange' is undefined)" 1412 strict mode: "TypeError: nf.formatRange is not a function. (In 'nf.formatRange(3, 5)', 'nf.formatRange' is undefined)" 1413 test/intl402/NumberFormat/prototype/formatRange/x-greater-than-y-throws.js: 1414 default: 'Test262Error: Expected a RangeError but got a TypeError' 1415 strict mode: 'Test262Error: Expected a RangeError but got a TypeError' 1395 1416 test/intl402/NumberFormat/prototype/formatRangeToParts/builtin.js: 1396 1417 default: 'Test262Error: The [[Class]] internal property of a built-in function must be "Function". Expected SameValue(«[object Undefined]», «[object Function]») to be true' … … 1448 1469 strict mode: 'Test262Error: -0.0001 (negative): length Expected SameValue(«2», «1») to be true' 1449 1470 test/intl402/PluralRules/prototype/selectRange/default-en-us.js: 1450 default: 'Test262Error: Expected SameValue(«other», «few») to be true' 1451 strict mode: 'Test262Error: Expected SameValue(«other», «few») to be true' 1471 default: "TypeError: pr.selectRange is not a function. (In 'pr.selectRange(102, 201)', 'pr.selectRange' is undefined)" 1472 strict mode: "TypeError: pr.selectRange is not a function. (In 'pr.selectRange(102, 201)', 'pr.selectRange' is undefined)" 1473 test/intl402/PluralRules/prototype/selectRange/invoked-as-func.js: 1474 default: 'Test262Error: Expected SameValue(«undefined», «function») to be true' 1475 strict mode: 'Test262Error: Expected SameValue(«undefined», «function») to be true' 1452 1476 test/intl402/PluralRules/prototype/selectRange/length.js: 1453 default: 'Test262Error: descriptor value should be 2' 1454 strict mode: 'Test262Error: descriptor value should be 2' 1477 default: "TypeError: undefined is not an object (evaluating 'Object.getOwnPropertyDescriptor(obj, name)')" 1478 strict mode: "TypeError: undefined is not an object (evaluating 'Object.getOwnPropertyDescriptor(obj, name)')" 1479 test/intl402/PluralRules/prototype/selectRange/name.js: 1480 default: "TypeError: undefined is not an object (evaluating 'Object.getOwnPropertyDescriptor(obj, name)')" 1481 strict mode: "TypeError: undefined is not an object (evaluating 'Object.getOwnPropertyDescriptor(obj, name)')" 1455 1482 test/intl402/PluralRules/prototype/selectRange/nan-arguments-throws.js: 1456 default: 'Test262Error: NaN/Number Expected a RangeError to be thrown but no exception was thrown at all' 1457 strict mode: 'Test262Error: NaN/Number Expected a RangeError to be thrown but no exception was thrown at all' 1458 test/intl402/PluralRules/prototype/selectRange/undefined-arguments-throws.js: 1459 default: 'Test262Error: Expected a TypeError to be thrown but no exception was thrown at all' 1460 strict mode: 'Test262Error: Expected a TypeError to be thrown but no exception was thrown at all' 1483 default: 'Test262Error: NaN/Number Expected a RangeError but got a TypeError' 1484 strict mode: 'Test262Error: NaN/Number Expected a RangeError but got a TypeError' 1485 test/intl402/PluralRules/prototype/selectRange/prop-desc.js: 1486 default: 'Test262Error: `typeof Intl.PluralRules.prototype.selectRange` is `function` Expected SameValue(«undefined», «function») to be true' 1487 strict mode: 'Test262Error: `typeof Intl.PluralRules.prototype.selectRange` is `function` Expected SameValue(«undefined», «function») to be true' 1488 test/intl402/PluralRules/prototype/selectRange/x-greater-than-y-throws.js: 1489 default: 'Test262Error: Expected a RangeError but got a TypeError' 1490 strict mode: 'Test262Error: Expected a RangeError but got a TypeError' 1461 1491 test/intl402/Temporal/PlainTime/prototype/toLocaleString/locales-undefined.js: 1462 1492 default: 'TypeError: Temporal.PlainTime.prototype.valueOf must not be called. To compare PlainTime values, use Temporal.PlainTime.compare' -
trunk/Source/JavaScriptCore/ChangeLog
r287531 r287543 1 2022-01-03 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] Fix length of Intl.NumberFormat.formatRange and Intl.PluralRules.selectRange 4 https://bugs.webkit.org/show_bug.cgi?id=234806 5 6 Reviewed by Alexey Shvayka. 7 8 These length's numbers are wrong. This patch fixes them. 9 10 * runtime/IntlNumberFormatPrototype.cpp: 11 (JSC::IntlNumberFormatPrototype::finishCreation): 12 * runtime/IntlPluralRulesPrototype.cpp: 13 (JSC::IntlPluralRulesPrototype::finishCreation): 14 1 15 2022-01-02 Yusuke Suzuki <ysuzuki@apple.com> 2 16 -
trunk/Source/JavaScriptCore/runtime/IntlNumberFormatPrototype.cpp
r286255 r287543 88 88 UNUSED_PARAM(globalObject); 89 89 #if HAVE(ICU_U_NUMBER_RANGE_FORMATTER) 90 JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("formatRange", intlNumberFormatPrototypeFuncFormatRange, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);90 JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("formatRange", intlNumberFormatPrototypeFuncFormatRange, static_cast<unsigned>(PropertyAttribute::DontEnum), 2); 91 91 #endif 92 92 #if HAVE(ICU_U_NUMBER_RANGE_FORMATTER_FORMAT_RANGE_TO_PARTS) -
trunk/Source/JavaScriptCore/runtime/IntlPluralRulesPrototype.cpp
r285730 r287543 78 78 UNUSED_PARAM(globalObject); 79 79 #if HAVE(ICU_U_NUMBER_RANGE_FORMATTER) 80 JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->selectRange, intlPluralRulesPrototypeFuncSelectRange, static_cast<unsigned>(PropertyAttribute::DontEnum), 0);80 JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->selectRange, intlPluralRulesPrototypeFuncSelectRange, static_cast<unsigned>(PropertyAttribute::DontEnum), 2); 81 81 #endif 82 82 }
Note: See TracChangeset
for help on using the changeset viewer.