Closed Bug 966559 Opened 10 years ago Closed 8 years ago

Internationalization API uses ICU C++ API for NumberingSystem

Categories

(Core :: JavaScript: Internationalization API, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: mozillabugs, Unassigned)

References

Details

Attachments

(2 files, 2 obsolete files)

The implementation of the ECMAScript Internationalization uses the ICU C++ API to obtain information about the default numbering system for a locale. Using the C++ API is unsafe when using an ICU library provided by the operating system:
http://userguide.icu-project.org/design#TOC-ICU-Binary-Compatibility:-Using-ICU-as-an-Operating-System-Level-Library

The C++ API was used here because there was no equivalent C API at the time:
http://bugs.icu-project.org/trac/ticket/10039
The missing C API has since been added in ICU 52.
Attached patch Use new C API instead of C++ API (obsolete) (deleted) — Splinter Review
This patch builds with the Internationalization API enabled or disabled, and passes the intl402 tests if build with the Internationalization API enabled.

However, the new C API in ICU is still marked as draft in the API documentation, so it may be to early to use it in production:
http://icu-project.org/apiref/icu4c/unumsys_8h.html
Attached patch Use new C API instead of C++ API (obsolete) (deleted) — Splinter Review
Now with updated check_spidermonkey_style.py. Try run at
https://tbpl.mozilla.org/?tree=Try&rev=1e768a6157d7
Attachment #8369022 - Attachment is obsolete: true
Component: JavaScript Engine → JavaScript: Internationalization API
Attached patch Updated partial patch (deleted) — Splinter Review
This patch would be complete, but on b2g where we use the system ICU in some configurations, the system ICU is "50.1+" per build/autoconf/icu.m4.  According to this bug, unumsys.h was added in 52.1, so landing this patch as-is would break b2g with system ICU.

Where's that leave this patch?  Pocketed, I guess, until system b2g is newer.  Or maybe some sort of adjustment can be made based on $ANDROID_VERSION.  I dunno.  Not important enough to investigate and possibly solve now.
Attachment #8369122 - Attachment is obsolete: true
Depends on: 1298614
Can we now land it?
Dusted off the patch.
Comment on attachment 8806460 [details]
Bug 966559 - Use public C API for NumberingSystem.

https://reviewboard.mozilla.org/r/89888/#review89442
Attachment #8806460 - Flags: review?(jwalden+bmo) → review+
Pushed by zbraniecki@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c28c8e058e17
Use public C API for NumberingSystem. r=Waldo
https://hg.mozilla.org/mozilla-central/rev/c28c8e058e17
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: