mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-04 15:51:37 +00:00

Before this patch, if nsNSSComponent initialization failed after allocating the XPCOM object for the component but before dispatching the load loadable roots task, BlockUntilLoadableRootsLoaded would block indefinitely in ShutdownNSS (called from ~nsNSSComponent). This patch re-arranges some things so that nsNSSComponent cleanup won't block on the load loadable roots task if it never fired. It also splits the cleanup into idempotent operations and operations that can only be run once. Unfortunately if nsNSSComponent initialization fails, Firefox is likely to exit or fail promptly anyway (since it is essential to so many other components). However, quitting outright is probably a better experience than hanging indefinitely. MozReview-Commit-ID: RWmBUV2pEU --HG-- extra : rebase_source : e2d06178ecc8ca8681eef18cb3af0a9ac8f83d1c