SecurityEngineering/NSS Startup and Shutdown in Gecko: Difference between revisions

Jump to navigation Jump to search
add bug link
(→‎How to Get There: better idea for objects created before NSS initialization)
(add bug link)
Line 26: Line 26:
* Fix all NSS shutdown leaks: [https://bugzilla.mozilla.org/show_bug.cgi?id=1230312 bug 1230312]
* Fix all NSS shutdown leaks: [https://bugzilla.mozilla.org/show_bug.cgi?id=1230312 bug 1230312]
* Make NSS shutdown leaks fatal
* Make NSS shutdown leaks fatal
* Handle the case where an object that needs to be tracked to free resources on NSS shutdown is created before NSS is initialized (this should and can be made to work)
* Handle the case where an object that needs to be tracked to free resources on NSS shutdown is created before NSS is initialized (this should and can be made to work - [https://bugzilla.mozilla.org/show_bug.cgi?id=1235634 bug 1235634])
* Separate NSS-only initialization from PSM component initialization
* Separate NSS-only initialization from PSM component initialization
* Ensure NSS is initialized before execution reaches any code that requires it
* Ensure NSS is initialized before execution reaches any code that requires it
* Provide a better mechanism for preventing NSS from shutting down (and checking if it has already shut down)
* Provide a better mechanism for preventing NSS from shutting down (and checking if it has already shut down)
** Currently the only way to do this that (mostly) works is for a class to implement the nsNSSShutDownObject mechanism, acquire an nsNSSShutDownPreventionLock and check isAlreadyShutDown. It should be possible to perform the same steps without implementing nsNSSShutDownObject (indeed, this would be better, since that interface has more to do with releasing long-lived NSS resources at shutdown). Furthermore, this mechanism doesn't entirely work, because if an object that implements nsNSSShutDownObject is instantiated after NSS has been shut down, isAlreadyShutDown will actually return false.
** Currently the only way to do this that (mostly) works is for a class to implement the nsNSSShutDownObject mechanism, acquire an nsNSSShutDownPreventionLock and check isAlreadyShutDown. It should be possible to perform the same steps without implementing nsNSSShutDownObject (indeed, this would be better, since that interface has more to do with releasing long-lived NSS resources at shutdown). Furthermore, this mechanism doesn't entirely work, because if an object that implements nsNSSShutDownObject is instantiated after NSS has been shut down, isAlreadyShutDown will actually return false.
Confirmed users
307

edits

Navigation menu