Closed Bug 1339621 Opened 4 years ago Closed 4 years ago

Directly add default null collation to available collations list

Categories

(Core :: JavaScript: Internationalization API, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: anba, Assigned: anba)

Details

Attachments

(1 file)

This avoids the Array.prototype.unshift call collatorSortLocaleData. 

When I was running the sessionrestore_no_auto_restore and ts_paint Talos tests locally to test if any array fails to use the Array.prototype.unshift optimization (bug 1337119, bug 1323782), I found out that the optimization fails for the collations array. (This was even the only array for which this optimization failed!)
Attached patch bug1339621.patchSplinter Review
Removes the unshift() call by directly placing |null| at the correct position in the collations array.
Attachment #8837349 - Flags: review?(jwalden+bmo)
Comment on attachment 8837349 [details] [diff] [review]
bug1339621.patch

Review of attachment 8837349 [details] [diff] [review]:
-----------------------------------------------------------------

I never did like that null-shifting, but I never found the time to actually justify the cleanup.
Attachment #8837349 - Flags: review?(jwalden+bmo) → review+
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/edf262601235
Directly add default null collation instead of shifting all elements with unshift(). r=Waldo
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/edf262601235
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.