Closed Bug 350872 Opened 18 years ago Closed 4 years ago

PSM can access string bundles on non-main threads

Categories

(Core :: Security: PSM, defect, P3)

1.8 Branch
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: KaiE, Unassigned)

References

Details

(Keywords: perf, Whiteboard: [psm-backlog])

The PSM code that brings up an error message on SSL or Certificate error messages loads the brand string bundle on a secondary thread.

We get warnings on the console when this happens, about some code not being threadsafe.

PSM should be changed to pre-load the required brand name on the main thread, to avoid loading the string bundle on the wrong thread.
QA Contact: psm
I believe this was fixed by the PSM parts to bug 675221 and/or bug 703508. Now, error message strings are generated on-demand by nNSSSocketInfo's implementation of nsITransportSecurityInfo::GetErrorMessage(), and GetErrorMessage() is only called on the main thread.

Kai, Please resolve the bug as a duplicate of one of those two bugs if you agree.
reassign bug owner.
mass-update-kaie-20120918
Assignee: kaie → nobody
Once all of the instances of this have been removed (which may have already happened), the initialization of the string bundles in nsNSSComponent::Init should be removed, because they were only being initialized in nsNSSComponent::Init because each string bundle must be accessed first on the main thread.
Keywords: perf
nsNSSCallbacks.cpp's HandshakeCallback still calls nssComponent->PIPBundleFormatStringFromName on the socket thread.
It doesn't look like HandshakeCallback calls PIPBundleFormatStringFromName any longer, but there may be other areas where this is an issue (see e.g. https://dxr.mozilla.org/mozilla-central/rev/3461f3cae78495f100a0f7d3d2e0b89292d3ec02/security/manager/ssl/TransportSecurityInfo.cpp#225 ).
Summary: PSM loads brand string bundle on secondary thread → PSM can access string bundles on non-main threads
Whiteboard: [psm-backlog]

All uses are on the main thread now (and most are going to be removed anyway when we remove the old certificate viewer).

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.