Closed Bug 1403319 Opened 7 years ago Closed 7 years ago

Expose Intl.NumberFormat.prototype.formatToParts

Categories

(Core :: JavaScript: Internationalization API, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: zbraniecki, Assigned: zbraniecki)

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

Intl.NumberFormat.prototype.formatToParts reached Stage 4 at today's TC39 meeting. We can expose it now to the public! :)
Assignee: nobody → gandalf
Status: NEW → ASSIGNED
Attachment #8912816 - Flags: review?(andrebargull)
Andre, can you take a look? The proposal reached Stage 4 so I'd like to expose it soon. Also, it would help a lot with our tooling if you could pick a `[:abargull]` or similar nick for bugzilla and MR when requesting reviews from you ;)
Comment on attachment 8912816 [details] Bug 1403319 - Expose Intl.NumberFormat.prototype.formatToParts. https://reviewboard.mozilla.org/r/184124/#review189698 We should now be able to run all NumberFormat.formatToParts tests from test262, so these exclusions should be removed <http://searchfox.org/mozilla-central/rev/f54c1723befe6bcc7229f005217d5c681128fcad/js/src/tests/jstests.list#363-368>, too. ::: js/src/builtin/Intl.cpp (Diff revision 1) > - // enabled, also add it. > - if (cx->compartment()->creationOptions().experimentalNumberFormatFormatToPartsEnabled()) { > - RootedValue ftp(cx); > - HandlePropertyName name = cx->names().formatToParts; > - if (!GlobalObject::getSelfHostedFunction(cx, cx->global(), > - cx->names().NumberFormatFormatToParts, Looks like `NumberFormatFormatToParts` and `formatToParts` can both now also be removed from vm/CommonPropertyNames.h. ::: js/src/tests/Intl/NumberFormat/formatToParts.js:1 (Diff revision 1) > -// |reftest| skip-if(!this.hasOwnProperty("Intl")||typeof(newGlobal)!=="function"||!newGlobal({experimentalNumberFormatFormatToPartsEnabled:true}).Intl.NumberFormat().formatToParts) > +// |reftest| skip-if(!this.hasOwnProperty("Intl")||typeof(newGlobal)!=="function") `typeof(newGlobal)!=="function"` can also be removed now.
Attachment #8912816 - Flags: review?(andrebargull) → review+
(In reply to André Bargull [:anba] from comment #3) > We should now be able to run all NumberFormat.formatToParts tests from > test262, so these exclusions should be removed > <http://searchfox.org/mozilla-central/rev/ > f54c1723befe6bcc7229f005217d5c681128fcad/js/src/tests/jstests.list#363-368>, > too. Well, except for this one test which still expects Intl.NumberFormat.prototype.formatToParts.length is 0 instead of 1 <http://searchfox.org/mozilla-central/rev/f54c1723befe6bcc7229f005217d5c681128fcad/js/src/tests/test262/intl402/NumberFormat/prototype/formatToParts/length.js#9>. :-)
Thanks Andre! Submitted a PR to test262 for the length issue https://github.com/tc39/test262/pull/1249 I'll keep it skipped for now and once we merge updated test262 we can reenable it.
Pushed by zbraniecki@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/353baf72f789 Expose Intl.NumberFormat.prototype.formatToParts. r=anba
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: