Remove String generics
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
People
(Reporter: arai, Assigned: evilpie)
References
(Blocks 1 open bug)
Details
(Keywords: addon-compat, dev-doc-complete, site-compat)
Attachments
(2 files)
Updated•9 years ago
|
Comment 1•9 years ago
|
||
Reporter | ||
Updated•8 years ago
|
Assignee | ||
Comment 2•7 years ago
|
||
Assignee | ||
Comment 3•6 years ago
|
||
The telemetry for this produced quite interesting results.
method | usage |
---|---|
toLowerCase | 519106 (97.75%) |
concat | 4898 (0.92%) |
slice | 3490 (0.66%) |
trim | 3336 (0.63%) |
The rest is basically at 0%. source
I wonder if we should just go ahead and remove all of the rest? Except for toLowerCase even the rest feels quite low.
Comment 4•6 years ago
|
||
There's an old Mootools version in-tree, which, as part of its initialisation, seems to call String.toLowerCase. Maybe this Mootools version is still used on the Web and that's why toLowerCase
is so prominent in the telemetry data? In that case it's safe to remove toLowerCase
, because Mootools will add it back.
Assignee | ||
Comment 5•6 years ago
|
||
(In reply to André Bargull [:anba] from comment #4)
There's an old Mootools version in-tree, which, as part of its initialisation, seems to call String.toLowerCase. Maybe this Mootools version is still used on the Web and that's why
toLowerCase
is so prominent in the telemetry data? In that case it's safe to removetoLowerCase
, because Mootools will add it back.
Wow good find! I really hope this is true and we can just remove everything.
Assignee | ||
Comment 6•6 years ago
|
||
Comment 7•6 years ago
|
||
That really is an amazing find, anba. Wow.
Assignee | ||
Comment 8•6 years ago
|
||
Comment 10•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c59acf298136
https://hg.mozilla.org/mozilla-central/rev/a8c448b92913
Updated•6 years ago
|
Comment 11•6 years ago
|
||
== Change summary for alert #20084 (as of Sat, 23 Mar 2019 05:37:40 GMT) ==
Improvements:
1% Base Content JS linux64 pgo stylo 3,999,578.67 -> 3,968,909.33
1% Base Content JS linux64-pgo-qr opt stylo 3,999,470.67 -> 3,968,886.67
1% Base Content JS windows10-64-pgo-qr opt stylo 4,073,260.00 -> 4,046,252.00
1% Base Content JS windows10-64 pgo stylo 4,073,281.33 -> 4,046,340.00
1% Base Content JS osx-10-10 opt stylo 4,000,505.33 -> 3,974,025.33
0% Base Content JS windows7-32 pgo stylo 3,165,454.67 -> 3,150,896.00
For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=20084
Comment 12•5 years ago
|
||
Posted site compatibility note: https://www.fxsitecompat.com/en-CA/docs/2019/non-standard-string-generics-have-been-removed/
Updated•5 years ago
|
Comment 13•5 years ago
|
||
Sorry this slipped through somehow in time for Firefox 68.
Announced on Firefox 68 release notes: https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/68#JavaScript
Updated the warning page that is shown in earlier Firefox versions: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Deprecated_String_generics
Removed the entire "String generics" section from the String API docs: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String
Description
•