Closed Bug 1359294 Opened 8 years ago Closed 8 years ago

Permaorange on Android in test262/built-ins/String/prototype/toLocaleUpperCase/special_casing.js when Gecko 55 merges to beta on 2017-06-12

Categories

(Core :: JavaScript Engine, defect)

55 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox-esr45 --- unaffected
firefox-esr52 --- unaffected
firefox53 --- unaffected
firefox54 --- unaffected
firefox55 + fixed

People

(Reporter: philor, Assigned: anba)

Details

Attachments

(1 file, 2 obsolete files)

It's a pain to see it, since I had to file two harness bugs on my way to filing this, but if you search https://public-artifacts.taskcluster.net/ELJuP6gISpCziQnZ0Wt1Eg/0/public/logs/live_backing.log for the string "unexpected" you'll find INFO - REFTEST TEST-START | http://10.0.2.2:8854/jsreftest/tests/jsreftest.html?test=test262/built-ins/String/prototype/toLocaleUpperCase/special_casing.js INFO - REFTEST TEST-LOAD | http://10.0.2.2:8854/jsreftest/tests/jsreftest.html?test=test262/built-ins/String/prototype/toLocaleUpperCase/special_casing.js | 258 / 677 (38%) INFO - {"action":"test_end","time":1493046584589,"thread":null,"pid":null,"source":"reftest","test":"http://10.0.2.2:8854/jsreftest/tests/jsreftest.html?test=test262/built-ins/String/prototype/toLocaleUpperCase/special_casing.js","status":"FAIL","expected":"PASS","message":"Unknown :0: uncaught exception: Test262Error: LATIN SMALL LETTER SHARP S Expected SameValue(�߻, �SS�) to be true item 1","extra":{"status_msg":"UnexpectedFail"}} INFO - REFTEST INFO | Saved log: START http://10.0.2.2:8854/jsreftest/tests/jsreftest.html?test=test262/built-ins/String/prototype/toLocaleUpperCase/special_casing.js INFO - REFTEST INFO | Saved log: [CONTENT] OnDocumentLoad triggering AfterOnLoadScripts INFO - REFTEST INFO | Saved log: Initializing canvas snapshot INFO - REFTEST INFO | Saved log: [CONTENT] AfterOnLoadScripts belatedly entering WaitForTestEnd INFO - REFTEST INFO | Saved log: [CONTENT] WaitForTestEnd: Adding listeners INFO - REFTEST INFO | Saved log: Initializing canvas snapshot INFO - REFTEST INFO | Saved log: [CONTENT] MakeProgress: STATE_WAITING_TO_FIRE_INVALIDATE_EVENT INFO - REFTEST INFO | Saved log: [CONTENT] MakeProgress: dispatching MozReftestInvalidate INFO - REFTEST INFO | Saved log: [CONTENT] MakeProgress: STATE_WAITING_FOR_REFTEST_WAIT_REMOVAL INFO - REFTEST INFO | Saved log: [CONTENT] MakeProgress: STATE_WAITING_FOR_SPELL_CHECKS INFO - REFTEST INFO | Saved log: [CONTENT] MakeProgress: STATE_WAITING_FOR_APZ_FLUSH INFO - REFTEST INFO | Saved log: [CONTENT] MakeProgress: APZ flush not required INFO - REFTEST INFO | Saved log: [CONTENT] MakeProgress: STATE_WAITING_TO_FINISH INFO - REFTEST INFO | Saved log: [CONTENT] MakeProgress: Completed INFO - REFTEST INFO | Saved log: [CONTENT] RecordResult fired INFO - REFTEST INFO | Saved log: RecordResult fired which is going to be permaorange on both opt and debug Android when mozilla-central merges to mozilla-beta on 2017-06-12.
Flags: needinfo?(shu)
[Tracking Requested - why for this release]: merge permaorange, closed tree, delayed b1, wailing and rending of garments.
Tracking 55+ for this permaorange.
We've got two options here: - Disable the special casing tests when EXPOSE_INTL_API isn't set. - Or stop using the localeToUpperCase/localeToLowerCase callbacks in XPCLocale.
anba, what's causing the failure here? And which option do you think is best? I really have very little opinion regarding Intl stuff so I'm happy to defer.
Flags: needinfo?(shu)
Flags: needinfo?(andrebargull)
(In reply to Shu-yu Guo [:shu] from comment #4) > anba, what's causing the failure here? In bug 1318403, I've updated String.prototype.to[Locale]{Lower,Upper}Case() to support special-casing rules, e.g. ß (sharp-S) is now properly upper-cased to SS. But when EXPOSE_INTL_API isn't set (= Android), str_toLocaleUpperCase still uses the old "localeCallback" functionality (http://searchfox.org/mozilla-central/rev/876c7dd30586f9c6f9c99ef7444f2d73c7acfe7c/js/src/jsstr.cpp#1249-1256). In this case, http://searchfox.org/mozilla-central/rev/876c7dd30586f9c6f9c99ef7444f2d73c7acfe7c/js/xpconnect/src/XPCLocale.cpp#119 calls http://searchfox.org/mozilla-central/rev/876c7dd30586f9c6f9c99ef7444f2d73c7acfe7c/intl/unicharutil/util/nsUnicharUtils.cpp#192, which does a character-by-character upper-case conversion without applying special-casing rules. > And which option do you think is best? I really have very little opinion regarding Intl stuff so I'm happy to defer. I'd probably remove these two lines http://searchfox.org/mozilla-central/rev/876c7dd30586f9c6f9c99ef7444f2d73c7acfe7c/js/xpconnect/src/XPCLocale.cpp#108-109, because the current implementation of the case-conversion functions in jsstr.cpp provides better spec compliance and is also faster.
Flags: needinfo?(andrebargull)
(In reply to André Bargull from comment #6) > Removing the callbacks (https://hg.mozilla.org/try/rev/6a2888b2b112) seems > to work: > https://treeherder.mozilla.org/#/ > jobs?repo=try&revision=6d4b0898d94a39d150404da2cdb26385e0e2a4d6 Could you please put this patch up and r? Waldo. Thanks!
Flags: needinfo?(andrebargull)
This removes the toLocaleUpper/LowerCase callbacks from XPCLocale, because they don't appear to be useful anymore (comment #5).
Assignee: nobody → andrebargull
Status: NEW → ASSIGNED
Flags: needinfo?(andrebargull)
I don't know if it's okay to remove these callbacks from jsapi, other embedders may still use them?
Attachment #8863895 - Flags: review?(jwalden+bmo)
Comment on attachment 8863895 [details] [diff] [review] bug1359294-part1-remove-case-callbacks-from-xpclocale.patch Review of attachment 8863895 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/xpconnect/src/XPCLocale.cpp @@ +77,5 @@ > { > MOZ_COUNT_CTOR(XPCLocaleCallbacks); > > + localeToUpperCase = nullptr; > + localeToLowerCase = nullptr; Put a comment by these to the effect that this makes toLocaleUpperCase/toLocaleLowerCase -- iff these hooks are consulted at all, which they are not in Intl-enabled builds -- behave identical to toUpperCase/toLowerCase. Ideally run the wording past me/#jsapi if you can.
Attachment #8863895 - Flags: review?(jwalden+bmo) → review+
Attachment #8863896 - Attachment is obsolete: true
Attached patch bug1359294.patchSplinter Review
Updated per review comments, carrying r+ from Waldo.
Attachment #8863895 - Attachment is obsolete: true
Attachment #8864244 - Flags: review+
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/d8bf16b7579c Remove toLocaleLowerCase/toLocaleUpperCase callbacks in XPCLocale. r=Waldo
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: