Closed
Bug 1466942
Opened 6 years ago
Closed 6 years ago
avoid l10n string bundles in nsNSSComponent initialization
Categories
(Core :: Security: PSM, enhancement, P1)
Core
Security: PSM
Tracking
()
RESOLVED
FIXED
mozilla62
Tracking | Status | |
---|---|---|
firefox62 | --- | fixed |
People
(Reporter: keeler, Assigned: keeler)
References
Details
(Whiteboard: [psm-assigned])
Attachments
(1 file)
Currently nsNSSComponent initialization calls PK11_ConfigurePKCS11 with some localized strings. Loading these strings can slow down startup. Also, we never call PK11_UnconfigurePKCS11, so the memory allocated to these strings sticks around forever. We can address both of these problems by not calling PK11_ConfigurePKCS11. This means that we have to localize some properties of NSS' internal "PKCS#11 slots/tokens" when displaying them to the user.
Comment hidden (mozreview-request) |
Assignee | ||
Updated•6 years ago
|
Attachment #8983562 -
Flags: review?(jjones) → review?(franziskuskiefer)
Comment 2•6 years ago
|
||
mozreview-review |
Comment on attachment 8983562 [details]
bug 1466942 - avoid l10n string bundles in nsNSSComponent initialization
https://reviewboard.mozilla.org/r/249418/#review255742
lgtm with one nit.
::: security/manager/ssl/nsNSSCertHelper.h:32
(Diff revision 1)
>
> // Must be used on the main thread only.
> nsresult
> GetPIPNSSBundleString(const char* stringName, nsAString& result);
> nsresult
> +GetPIPNSSBundleString(const char* stringName, nsACString& result);
Maybe make it `GetPIPNSSBundleUTF8String` or something. The `C` in the result string can be easily missed.
Attachment #8983562 -
Flags: review?(franziskuskiefer) → review+
Assignee | ||
Comment 3•6 years ago
|
||
mozreview-review-reply |
Comment on attachment 8983562 [details]
bug 1466942 - avoid l10n string bundles in nsNSSComponent initialization
https://reviewboard.mozilla.org/r/249418/#review255742
Thanks!
> Maybe make it `GetPIPNSSBundleUTF8String` or something. The `C` in the result string can be easily missed.
I asked around a bit and it doesn't seem like there's any style guidelines on overloading. In this case, since the functions are identical except one returns a UTF8 string, I think it's reasonable to just use the overload. I'm reluctant to put UTF8 in the name since that's what the type signature is for.
Assignee | ||
Comment 4•6 years ago
|
||
Pushed by dkeeler@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1ab062fd31db
avoid l10n string bundles in nsNSSComponent initialization r=fkiefer
Comment 6•6 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox62:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in
before you can comment on or make changes to this bug.
Description
•