Commit 47388e1
committed
Bug 1993818 - Don't add battery observer after xpcom-will-shutdown. r=bradwerth
In bug 1981068 we made GPUProcessManager remove its battery observer
in xpcom-will-shutdown rather than xpcom-shutdown, to ensure there are
no outstanding observers when MacPowerInformationService shuts down in
response to xpcom-shutdown. However, if the GPU process launch
completes after xpcom-will-shutdown but before xpcom-shutdown, then we
will create a new battery observer, causing the assertion that there
are no outstanding observers during xpcom-shutdown to fail.
This patch avoids this by checking the shutdown phase prior to
creating the observer. Temporarily running without the observer is
harmless, and the GPU process will be shutdown imminently anyway.
Differential Revision: https://phabricator.services.mozilla.com/D272843
UltraBlame original commit: 4c3e758d1aecdef721408ab77bffb5c04e4314a81 parent bb048b7 commit 47388e1
1 file changed
+16
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4079 | 4079 | | |
4080 | 4080 | | |
4081 | 4081 | | |
| 4082 | + | |
| 4083 | + | |
| 4084 | + | |
| 4085 | + | |
| 4086 | + | |
| 4087 | + | |
| 4088 | + | |
| 4089 | + | |
| 4090 | + | |
| 4091 | + | |
| 4092 | + | |
| 4093 | + | |
| 4094 | + | |
| 4095 | + | |
| 4096 | + | |
4082 | 4097 | | |
4083 | 4098 | | |
4084 | 4099 | | |
4085 | 4100 | | |
4086 | 4101 | | |
4087 | 4102 | | |
4088 | 4103 | | |
| 4104 | + | |
4089 | 4105 | | |
4090 | 4106 | | |
4091 | 4107 | | |
| |||
0 commit comments