From 6a283067e7f44d7a458c042de1040ff2fb3d76dc Mon Sep 17 00:00:00 2001 From: Aaron Klotz Date: Fri, 6 Dec 2019 22:13:07 +0000 Subject: [PATCH] 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 --- widget/windows/WinUtils.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/widget/windows/WinUtils.cpp b/widget/windows/WinUtils.cpp index bb8543c7896e..b75aa316a8cf 100644 --- a/widget/windows/WinUtils.cpp +++ b/widget/windows/WinUtils.cpp @@ -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()) {