LocaleService is being restarted after closing, during shutdown
Categories
(Core :: Internationalization, defect, P3)
Tracking
()
People
(Reporter: adrian17, Unassigned)
References
Details
LocaleService singleton is set to be cleaned during shutdown with this line:
ClearOnShutdown(&sInstance, ShutdownPhase::Shutdown);
The issue is, after we enter ShutdownPhase::Shutdown and shut the service down, something calls LocaleService::GetInstance to request the service instance again, which causes it to get re-created. This can be observed by logging the shutdown
phase and and constructor calls while running xpcshell tests.
While being a small waste of time during shutdown, it's also forcing us to add an artificial shutdown phase just to clean it up (see bug 1492629 comment 23) and it's blocking bug 1335607 - if the bug was fixed, re-initialization of the service during shutdown would trigger an assertion.
I'm guessing the simplest solution would be to move the service clear phase to ShutdownFinal - assuming that's possible. Otherwise, it needs investigation to figure out what exactly uses the service during shutdown.
Updated•6 years ago
|
Comment 1•6 years ago
|
||
I'm guessing the simplest solution would be to move the service clear phase to ShutdownFinal - assuming that's possible. Otherwise, it needs investigation to figure out what exactly uses the service during shutdown.
I'm ok with that. I'd also be ok with not creating a new instance after shutdown, but then the caller code would have to cover the scenario where GetInstance returns false.
Comment 2•4 years ago
|
||
LocaleService shutdown was recently moved to a later shutdown phase in Bug 1667493. Zibi, do you think there is anything left to do here, or can we call this a dupe of 1667493?
Comment 3•4 years ago
|
||
I'm not familiar with all shutdown stages.
Makoto, Jonathan - do you think that the change in Bug 1667493 is sufficient?
Comment 4•4 years ago
|
||
(In reply to Zibi Braniecki [:zbraniecki][:gandalf] from comment #3)
I'm not familiar with all shutdown stages.
Makoto, Jonathan - do you think that the change in Bug 1667493 is sufficient?
Yes, I think this is fixed by Bug 1667493. Bug 1667493 was re-used case after shutdown phase.
Description
•