Closed
Bug 1382656
Opened 6 years ago
Closed 6 years ago
Don't search for multiple Unicode extension sequences in a single language tag
Categories
(Core :: JavaScript: Internationalization API, enhancement)
Core
JavaScript: Internationalization API
Tracking
()
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
Details
Attachments
(1 file)
1.66 KB,
patch
|
till
:
review+
|
Details | Diff | Splinter Review |
Language tags cannot contain duplicate singletons, so don't need to search for multiple Unicode extension sequences in removeUnicodeExtensions().
Assignee | ||
Comment 1•6 years ago
|
||
When validating a language tag, we ensure that the language tag doesn't contain multiple singletons [1]. And given that a Unicode extension sequence is a singleton, we don't need to search for multiple Unicode extension sequences in the removeUnicodeExtensions() function. And we also don't need to reset |unicodeLocaleExtensionSequenceRE.lastIndex| to zero, because unicodeLocaleExtensionSequenceRE hasn't the global RegExp flag set. [1] http://searchfox.org/mozilla-central/rev/3a3af33f513071ea829debdfbc628caebcdf6996/js/src/builtin/Intl.js#340,342
Attachment #8888305 -
Flags: review?(till)
Comment 2•6 years ago
|
||
Comment on attachment 8888305 [details] [diff] [review] bug1382656.patch Review of attachment 8888305 [details] [diff] [review]: ----------------------------------------------------------------- r=me
Attachment #8888305 -
Flags: review?(till) → review+
Assignee | ||
Comment 3•6 years ago
|
||
(In reply to Till Schneidereit [:till] from comment #2) > Comment on attachment 8888305 [details] [diff] [review] > bug1382656.patch > > Review of attachment 8888305 [details] [diff] [review]: > ----------------------------------------------------------------- > > r=me Thanks for the super-fast review! (TBH I didn't expect to get such a quick review given that Unicode extension sequences in language tags is a rather niche topic. :-)
Assignee | ||
Comment 4•6 years ago
|
||
Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=7e537243fed2613487c724651f0b7e7473ed83eb
Keywords: checkin-needed
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/820435b85836 Don't search for multiple Unicode extension sequences in a single language tag. r=till
Keywords: checkin-needed
Comment 6•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/820435b85836
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in
before you can comment on or make changes to this bug.
Description
•