Closed
Bug 1357741
Opened 7 years ago
Closed 7 years ago
make nsCertOverrideService's locking more efficient
Categories
(Core :: Security: PSM, enhancement)
Core
Security: PSM
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: froydnj, Assigned: froydnj)
Details
Attachments
(1 file)
14.52 KB,
patch
|
keeler
:
review+
|
Details | Diff | Splinter Review |
nsCertOverrideService uses a ReentrantMonitor to protect its inner state. However, there's no way for nsCertOverrideService's methods to be re-entered when calling outside code. The use of ReentrantMonitor appears to be compensating for an unclear division of locking responsibilities, by enabling every method to simply lock the ReentrantMonitor upon entrance without care for who might have locked it beforehand. Using Mutex is cheaper than ReentrantMonitor, and also forces us to make explicit who's required to do locking, and who needs to do work with the lock held.
Assignee | ||
Comment 1•7 years ago
|
||
Try at least seems to think this patch is OK: https://treeherder.mozilla.org/#/jobs?repo=try&revision=f180f607141d4e6013caa861be83dca3e1b7ea53
Attachment #8859581 -
Flags: review?(dkeeler)
Comment on attachment 8859581 [details] [diff] [review] make nsCertOverrideService's locking more efficient Review of attachment 8859581 [details] [diff] [review]: ----------------------------------------------------------------- LGTM - thanks for writing this. ::: security/manager/ssl/nsCertOverrideService.h @@ +159,5 @@ > > protected: > ~nsCertOverrideService(); > > + mozilla::Mutex mutex; nit: maybe let's call this mMutex to be consistent with the other member variables
Attachment #8859581 -
Flags: review?(dkeeler) → review+
Pushed by nfroyd@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/8228b51bee64 make nsCertOverrideService's locking more efficient; r=keeler
Comment 4•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/8228b51bee64
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in
before you can comment on or make changes to this bug.
Description
•