Closed Bug 1473824 Opened Last year Closed 5 months ago

Do not try to unregister HAL observers during shutdown

Categories

(Core :: Hardware Abstraction Layer (HAL), enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: gsvelto, Unassigned)

Details

While refactoring HAL observers I noticed that we do a couple of weird things:

- Observer lists are instanced lazily but if we unregister an observer from a list that has not been instanced already we don't instance it

- We delete the lists asyncrhonously when removing the last observers

I originally thought both decisions made perfect sense but besides the added complexity they hide a significant issue: we have code that tries to unregister observer which have never been registered very late during shutdown. That code happens to work because of the above but should be considered buggy. This bug is for fixing the affected code and removing the explicit observer list allocation/deallocation.

This was fixed in bug 1476250. We're not deleting the lists asynchronously anymore and if one tries to deregisters an observer after the HAL has been shut down it will assert.

Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.