Bug 1522830: Part 11 - Adjust shutdown phase in widget/windows/WinUtils for telemetry whitelisting; r=mhowell

The current shutdown phase is too early and thus may crash when called
by `UntrustedModulesProcessor`. We move it to a later phase such that the
processor has already shut down.

Differential Revision: https://phabricator.services.mozilla.com/D53683

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Aaron Klotz 2019-12-06 22:13:07 +00:00
Родитель 9635a14382
Коммит 6a283067e7
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -2088,7 +2088,8 @@ WinUtils::WhitelistVec WinUtils::BuildWhitelist() {
const WinUtils::WhitelistVec& WinUtils::GetWhitelistedPaths() {
static WhitelistVec sWhitelist([]() -> WhitelistVec {
auto setClearFn = [ptr = &sWhitelist]() -> void {
RunOnShutdown([ptr]() -> void { ptr->clear(); }, ShutdownPhase::Shutdown);
RunOnShutdown([ptr]() -> void { ptr->clear(); },
ShutdownPhase::ShutdownFinal);
};
if (NS_IsMainThread()) {