Closed Bug 957368 Opened 7 years ago Closed 7 years ago

standardize and simplify nsNSSShutDownObject implementations

Categories

(Core :: Security: PSM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla29

People

(Reporter: keeler, Assigned: keeler)

References

Details

Attachments

(1 file)

Attached patch patchSplinter Review
The nsNSSShutDownObject implementations currently in the tree are a bit all over the place. This not only causes bugs due to misunderstandings (see bug 951354) but in some of these implementations, destructorSafeDestroyNSSReference() can be called twice, which could be problematic. Additionally, some of the implementations do unnecessary work (like acquiring an nsNSSShutDownPreventionLock twice and checking isAlreadyShutDown() twice). This patch implements and documents what I propose we change the canonical implementation to (in particular, see nsNSSShutDown.h)

Two comments are:
1. I'm not sure InitializeIdentityInfo even needs to implement nsNSSShutDownObject
2. CryptoTask is a bit of a special case - I'm intending to leave it as is unless we agree it should be changed as well
Attachment #8356843 - Flags: review?(cviecco)
Attachment #8356843 - Flags: feedback?(brian)
Comment on attachment 8356843 [details] [diff] [review]
patch

Review of attachment 8356843 [details] [diff] [review]:
-----------------------------------------------------------------

Dont like the bug name, but the patch is an r+
Attachment #8356843 - Flags: review?(cviecco) → review+
Attachment #8356843 - Flags: feedback?(brian) → review+
https://hg.mozilla.org/mozilla-central/rev/221049daa8dd
Assignee: nobody → dkeeler
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
You need to log in before you can comment on or make changes to this bug.