Closed Bug 1528412 Opened 6 years ago Closed 4 years ago

LocaleService is being restarted after closing, during shutdown

Categories

(Core :: Internationalization, defect, P3)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1667493

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.

Blocks: 1335607
Priority: -- → P3

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.

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?

Flags: needinfo?(zbraniecki)

I'm not familiar with all shutdown stages.

Makoto, Jonathan - do you think that the change in Bug 1667493 is sufficient?

Flags: needinfo?(zbraniecki)
Flags: needinfo?(m_kato)
Flags: needinfo?(jfkthame)

(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.

Status: NEW → RESOLVED
Closed: 4 years ago
Flags: needinfo?(m_kato)
Flags: needinfo?(jfkthame)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.