Closed Bug 1724889 Opened 3 years ago Closed 3 years ago

Minor cleanups in Localization.cpp

Categories

(Core :: Internationalization: Localization, task)

task

Tracking

()

RESOLVED FIXED
93 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox-esr91 --- unaffected
firefox91 --- unaffected
firefox92 --- fixed
firefox93 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(2 files)

No description provided.
Blocks: 1724833

Non-unified builds would choke on this file due to the missing includes.

At least this code seems to be doing twice the work in the common case:

https://searchfox.org/mozilla-central/rev/0fec57c05d3996cc00c55a66f20dd5793a9bfb5d/intl/l10n/Localization.cpp#439,447

Change the code to follow the more common "arrays are out-params" style,
and use in-place construction and early-returning when possible.

Depends on D122203

Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2f0e000467f8
Add missing includes and clean-up Localization.cpp. r=zbraniecki
https://hg.mozilla.org/integration/autoland/rev/10d3357fca07
Clean up argument conversions to avoid copies and double-work. r=zbraniecki

Comment on attachment 9235544 [details]
Bug 1724889 - Add missing includes and clean-up Localization.cpp. r=zbraniecki

Beta/Release Uplift Approval Request

  • User impact if declined: Slower localization
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: none
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Relatively simple cleanup that makes Localization faster.
  • String changes made/needed: none
Attachment #9235544 - Flags: approval-mozilla-beta?
Attachment #9235545 - Flags: approval-mozilla-beta?
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch

Comment on attachment 9235544 [details]
Bug 1724889 - Add missing includes and clean-up Localization.cpp. r=zbraniecki

Given that this isn't a new issue in 92, I would be more comfortable with this riding the trains.

Attachment #9235544 - Flags: approval-mozilla-beta? → approval-mozilla-beta-
Attachment #9235545 - Flags: approval-mozilla-beta? → approval-mozilla-beta-

This is a new issue in 92. It was introduced with the Localization-rs patchset

Flags: needinfo?(ryanvm)
Has Regression Range: --- → yes
Keywords: regression

Set release status flags based on info from the regressing bug 1613705

Comment on attachment 9235544 [details]
Bug 1724889 - Add missing includes and clean-up Localization.cpp. r=zbraniecki

In the future, it's always a good idea to call out when something's a regression from past behavior as that's definitely a factor we weigh when making approval decisions. Approved for 92.0b5.

Flags: needinfo?(ryanvm)
Attachment #9235544 - Flags: approval-mozilla-beta- → approval-mozilla-beta+
Attachment #9235545 - Flags: approval-mozilla-beta- → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: