gecko-dev/toolkit/xre
Toshihito Kikuchi ee1f6d7a78 Bug 1529593 - Make LauncherRegistryInfo delay write to the registry. r=aklotz
We have the `LauncherRegistryInfo` class to check the launcher process was
launched successfully on Windows by comparing the timestamps in the registry
when each process was launched.

The problem was when the process is launched from an elevated process, we
relaunch a new launcher process via shell after we updated the launcher's
timestamp.  As a result, `LauncherRegistryInfo` unexpectedly disabled the
launcher process even though there was nothing wrong.

A proposed fix is to introduce delay-write to the `LauncherRegistryInfo`.  With
this, `LauncherRegistryInfo::Check` modifies only the image timestamp. To update
the launcher/browser timestamps, we need to call `LauncherRegistryInfo::Commit`.
When we ask shell to relaunch a new process, we hold back commit, delegating it
to the new process.

There is another consideration needed.  If something fails during `LauncherMain`,
we call `DisableDueToFailure()` to disable the launcher until the image timestamp
is changed.  In such a case, we should not change the stored timestamps even
though commit is attempted.  The problem is we use a different instance to call
`DisableDueToFailure()` in `HandleLauncherError`.  To deal with this design,
`LauncherRegistryInfo` has a static boolean to indicate disablement happens or not.

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

--HG--
extra : moz-landing-system : lando
2019-10-14 17:14:54 +00:00
..
test Bug 1529593 - Make LauncherRegistryInfo delay write to the registry. r=aklotz 2019-10-14 17:14:54 +00:00
AutoSQLiteLifetime.cpp
AutoSQLiteLifetime.h
Bootstrap.cpp
Bootstrap.h
CmdLineAndEnvUtils.cpp
CmdLineAndEnvUtils.h Bug 1577706 - move checks for -url from toolkit into browser code, and make osint sanitizer app-agnostic, r=mossop 2019-09-03 17:01:33 +00:00
components.conf
CreateAppData.cpp
EventTracer.cpp
EventTracer.h
glxtest.cpp Bug 1578506 - Add better monitor information to about:support. r=aosmond 2019-10-03 23:43:35 +00:00
LauncherRegistryInfo.cpp Bug 1529593 - Make LauncherRegistryInfo delay write to the registry. r=aklotz 2019-10-14 17:14:54 +00:00
LauncherRegistryInfo.h Bug 1529593 - Make LauncherRegistryInfo delay write to the registry. r=aklotz 2019-10-14 17:14:54 +00:00
MacApplicationDelegate.h
MacApplicationDelegate.mm Bug 1564298: Make it possible to build with macOS 10.14 SDK. r=mstange 2019-07-18 19:23:04 +00:00
MacAutoreleasePool.h
MacAutoreleasePool.mm
MacLaunchHelper.h
MacLaunchHelper.mm
ModuleEvaluator.cpp Bug 1542830: Part 6 - Rewrite the untrusted modules processor in toolkit/xre; r=mhowell 2019-09-23 20:19:17 +00:00
ModuleEvaluator.h Bug 1542830: Part 6 - Rewrite the untrusted modules processor in toolkit/xre; r=mhowell 2019-09-23 20:19:17 +00:00
ModuleVersionInfo.cpp Bug 1542830: Part 6 - Rewrite the untrusted modules processor in toolkit/xre; r=mhowell 2019-09-23 20:19:17 +00:00
ModuleVersionInfo.h Bug 1542830: Part 6 - Rewrite the untrusted modules processor in toolkit/xre; r=mhowell 2019-09-23 20:19:17 +00:00
moz.build Bug 1542830: Part 6 - Rewrite the untrusted modules processor in toolkit/xre; r=mhowell 2019-09-23 20:19:17 +00:00
nsAndroidStartup.cpp
nsAppRunner.cpp Bug 1585156 - Remove useless inclusions of nsIDOMWindow.h and nsIDOMWindowUtils.h r=smaug 2019-09-30 22:06:47 +00:00
nsAppRunner.h
nsAppStartupNotifier.cpp Bug 1558306 - Clean up app-startup category/topics for readability. r=mconley 2019-06-12 17:50:13 +00:00
nsAppStartupNotifier.h
nsCommandLineServiceMac.h
nsCommandLineServiceMac.mm
nsConsoleWriter.cpp Bug 1558653. Stop using [array] in nsIConsoleService. r=froydnj 2019-06-12 18:10:19 +00:00
nsEmbeddingModule.cpp
nsEmbedFunctions.cpp Bug 1542830: Part 4 - Modify mozglue to use new untrusted modules interfaces; r=mhowell 2019-09-23 20:18:41 +00:00
nsGDKErrorHandler.cpp
nsGDKErrorHandler.h
nsIAppStartupNotifier.h Bug 1558306 - Clean up app-startup category/topics for readability. r=mconley 2019-06-12 17:50:13 +00:00
nsINativeAppSupport.idl
nsIWinAppHelper.idl
nsIXREDirProvider.idl
nsNativeAppSupportBase.cpp
nsNativeAppSupportBase.h
nsNativeAppSupportCocoa.mm
nsNativeAppSupportDefault.cpp
nsNativeAppSupportUnix.cpp Bug 1490059 - Also call "session-save" in the SmSaveGlobal case r=stransky 2019-10-01 10:32:09 +00:00
nsNativeAppSupportWin.cpp
nsNativeAppSupportWin.h
nsSigHandlers.cpp
nsSigHandlers.h
nsUpdateDriver.cpp Bug 1577061: Modify nsUpdateDriver's GetCurrentWorkingDir to accept a nsACString& argument; r=mhowell 2019-08-28 17:29:06 +00:00
nsUpdateDriver.h
nsWindowsRestart.cpp
nsWindowsWMain.cpp
nsX11ErrorHandler.cpp
nsX11ErrorHandler.h
nsXREDirProvider.cpp Bug 1583129 - Calculate legacy hash using x86 program file path for Thunderbird. r=mossop 2019-10-02 21:28:21 +02:00
nsXREDirProvider.h Bug 1580282 - Remove checks for plugins that are part of extensions and support for loading plugins from the app and profile dir, r=mconley,mixedpuppy 2019-09-12 23:15:49 +00:00
platform.ini
PolicyChecks.h
ProfileReset.cpp Bug 1557793 part 2. Stop using [array] in nsIStringBundle. r=Pike 2019-06-11 15:51:51 +00:00
ProfileReset.h
SafeMode.h Bug 1572838 - ensure osint commandline args are passed appropriately, r=mhowell,mossop 2019-08-20 19:51:34 +00:00
UIKitDirProvider.h
UIKitDirProvider.mm
UntrustedModulesData.cpp Bug 1542830: Part 6 - Rewrite the untrusted modules processor in toolkit/xre; r=mhowell 2019-09-23 20:19:17 +00:00
UntrustedModulesData.h Bug 1542830: Part 6 - Rewrite the untrusted modules processor in toolkit/xre; r=mhowell 2019-09-23 20:19:17 +00:00
UntrustedModulesProcessor.cpp Bug 1586886: Exclude processing thread from third-party-modules ping; r=mhowell 2019-10-07 20:04:25 +00:00
UntrustedModulesProcessor.h Bug 1542830: Part 6 - Rewrite the untrusted modules processor in toolkit/xre; r=mhowell 2019-09-23 20:19:17 +00:00
updaterfileutils_osx.h
updaterfileutils_osx.mm
WinDllServices.cpp Bug 1542830: Part 6 - Rewrite the untrusted modules processor in toolkit/xre; r=mhowell 2019-09-23 20:19:17 +00:00
WinDllServices.h Bug 1542830: Part 6 - Rewrite the untrusted modules processor in toolkit/xre; r=mhowell 2019-09-23 20:19:17 +00:00
WinTokenUtils.cpp Bug 1567219 - Add a metric to collect how many users launch a process with Admin but without UAC. r=aklotz 2019-08-28 02:17:49 +00:00
WinTokenUtils.h Bug 1576697 - Use LauncherResult in WinHeaderOnlyUtils.h instead of WindowsErrorResult. r=aklotz 2019-09-07 18:17:45 +00:00