gecko-dev/toolkit/xre
Aaron Klotz 004362bf3e Bug 1690384: Propagate error information up through XPCOMGlueLoad and GetBootstrap; r=glandium
We know that some GV installations (particularly but not exlcusively Focus) are
failing to load `libxul.so` during early Gecko bootstrapping. Unfortunately
a boolean pass/fail result is not giving us sufficient information to be able to
properly troubleshoot this problem.

This patch adds `mozilla::Result`-based return values to `XPCOMGlueLoad` and
`GetBootstrap` in an effort to produce more actionable information about these
failures.

We include either a `nsresult` or, if the failure is rooted in a dynamic linker
failure, appropriate platform-specific error information:

* On Unix-based platforms, a `UniqueFreePtr<char>` containing the string from `dlerror(3)`;
* On Windows, the Win32 `DWORD` error code from `GetLastError()`.

For non-Android platforms, I updated them to handle the new return type, but
otherwise did not make any further changes.

For Android, we include the error information in the message string that we pass
into the Java `Exception` that is subsequently thrown.

Differential Revision: https://phabricator.services.mozilla.com/D104263
2021-02-23 23:25:22 +00:00
..
test Bug 1691684 - Increase kMaximumPendingQueries to wait for expected loading events longer. r=mhowell 2021-02-16 21:50:57 +00:00
AssembleCmdLine.h
AutoSQLiteLifetime.cpp
AutoSQLiteLifetime.h
Bootstrap.cpp
Bootstrap.h Bug 1690384: Propagate error information up through XPCOMGlueLoad and GetBootstrap; r=glandium 2021-02-23 23:25:22 +00:00
CmdLineAndEnvUtils.cpp Bug 1660470 - Add missing include directives/forward declarations. r=nika 2020-11-23 16:21:38 +00:00
CmdLineAndEnvUtils.h Bug 1656185 - Put CommandLineParserWin behind MOZILLA_INTERNAL_API to compile with MinGW. r=mossop 2020-08-02 22:38:02 +00:00
CreateAppData.cpp
DllPrefetchExperimentRegistryInfo.cpp
DllPrefetchExperimentRegistryInfo.h
EventTracer.cpp
EventTracer.h
LauncherRegistryInfo.cpp
LauncherRegistryInfo.h
MacApplicationDelegate.h
MacApplicationDelegate.mm Bug 1692391 - Rename NS_OBJC_BEGIN/END_TRY_ABORT_BLOCK macros, replacing ABORT with IGNORE. These macros just log the exception and move on, without aborting. r=haik 2021-02-16 22:55:21 +00:00
MacAutoreleasePool.h
MacAutoreleasePool.mm
MacLaunchHelper.h
MacLaunchHelper.mm
ModuleEvaluator.cpp
ModuleEvaluator.h
ModuleVersionInfo.cpp
ModuleVersionInfo.h
MultiInstanceLock.cpp Bug 1553982 Part 1 - Manage "multi-instance locks" that can be created by any component. r=bytesized,nalexander 2020-12-11 05:37:38 +00:00
MultiInstanceLock.h Bug 1553982 Part 1 - Manage "multi-instance locks" that can be created by any component. r=bytesized,nalexander 2020-12-11 05:37:38 +00:00
PolicyChecks.h
ProfileReset.cpp Bug 1686616 - make StringBundle use Components instead of Services. r=kmag 2021-02-18 13:26:32 +00:00
ProfileReset.h Bug 1660470 - Add missing include directives/forward declarations. r=nika 2020-11-23 16:21:38 +00:00
SafeMode.h
UIKitDirProvider.h
UIKitDirProvider.mm
UntrustedModulesData.cpp Bug 1691894 - Simplify uses of WithEntryHandle that only use OrInsert(With) by using GetOrInsertWith. r=xpcom-reviewers,necko-reviewers,jgilbert,nika 2021-02-22 12:07:46 +00:00
UntrustedModulesData.h Bug 1686229 - Part1. Add a member to ModuleLoadInfo to indicate the status of DLL load. r=mhowell 2021-01-23 00:12:49 +00:00
UntrustedModulesProcessor.cpp Bug 1688833 - Migrate LookupForAdd to WithEntryHandle in toolkit/xre. r=tkikuchi 2021-02-09 18:19:41 +00:00
UntrustedModulesProcessor.h
WinDllServices.cpp
WinDllServices.h
WinTokenUtils.cpp
WinTokenUtils.h
components.conf Bug 1464542: Part 3b - Add existing Services.jsm registrations to the new services cache. r=mccr8,geckoview-reviewers,agi 2020-07-09 21:42:25 +00:00
glxtest.cpp Bug 1689207 - Some fixes for EGL in glxtest, r=aosmond 2021-02-15 18:52:18 +00:00
moz.build Bug 1667276 - Pre: Disable extension manager in background tasks mode. r=mossop 2021-01-27 22:54:02 +00:00
nsAndroidStartup.cpp Bug 689178 - Remove crash-reporter hooks to externally provide library mappings. r=gsvelto 2020-06-25 08:43:23 +00:00
nsAppRunner.cpp Bug 1686616 - make StringBundle use Components instead of Services. r=kmag 2021-02-18 13:26:32 +00:00
nsAppRunner.h Bug 1692851 - Use exec to launch firefox when switching profiles r=kmag 2021-02-17 23:38:56 +00:00
nsAppStartupNotifier.cpp Bug 1553982 Part 0 - Fix a few unified build issues that crop up when adding files in this directory. r=bytesized 2020-12-10 04:33:20 +00:00
nsAppStartupNotifier.h Bug 1553982 Part 0 - Fix a few unified build issues that crop up when adding files in this directory. r=bytesized 2020-12-10 04:33:20 +00:00
nsCommandLineServiceMac.h
nsCommandLineServiceMac.mm
nsConsoleWriter.cpp
nsEmbedFunctions.cpp Bug 1679272 - Include ScopeExit.h exactly where used. r=andi 2020-12-07 14:25:59 +00:00
nsEmbeddingModule.cpp
nsGDKErrorHandler.cpp
nsGDKErrorHandler.h
nsIAppStartupNotifier.h
nsINativeAppSupport.idl
nsIWinAppHelper.idl
nsIXREDirProvider.idl
nsNativeAppSupportBase.cpp
nsNativeAppSupportBase.h
nsNativeAppSupportCocoa.mm Bug 1692391 - Replace the NS_OBJC_BEGIN/END_TRY_ABORT_BLOCK_NSRESULT macros with the functionally identical NS_OBJC_BEGIN/END_TRY_BLOCK_RETURN(NS_ERROR_FAILURE). r=haik 2021-02-16 22:55:20 +00:00
nsNativeAppSupportDefault.cpp
nsNativeAppSupportUnix.cpp Bug 1675329: Add an API for returning an exit code from the application. r=dthayer,necko-reviewers,dragana,nika 2020-12-03 20:19:47 +00:00
nsNativeAppSupportWin.cpp
nsNativeAppSupportWin.h
nsSigHandlers.cpp Bug 1672908 - Fix "unused variable uc" on arm64 macOS. r=gsvelto 2020-10-23 07:12:54 +00:00
nsSigHandlers.h
nsUpdateDriver.cpp Bug 1674675 - nsUpdateDriver.cpp: simplify the code by removing an else r=sylvestre 2020-12-26 14:28:36 +00:00
nsUpdateDriver.h
nsUpdateSyncManager.cpp Bug 1553982 Part 2 - Use a multi-instance lock to implement an update sync manager XPCOM component. r=bytesized,nalexander 2020-12-11 02:03:40 +00:00
nsUpdateSyncManager.h Bug 1553982 Part 2 - Use a multi-instance lock to implement an update sync manager XPCOM component. r=bytesized,nalexander 2020-12-11 02:03:40 +00:00
nsWindowsRestart.cpp
nsWindowsWMain.cpp
nsX11ErrorHandler.cpp
nsX11ErrorHandler.h
nsXREDirProvider.cpp Bug 1691589 - Reduce reliance on GeckoProfiler.h when only labels (and maybe markers) are needed - r=necko-reviewers,geckoview-reviewers,sg,agi,florian 2021-02-16 04:44:19 +00:00
nsXREDirProvider.h
platform.ini
updaterfileutils_osx.h Bug 1684173 - Add newline character at end of files when missing r=sylvestre,geckoview-reviewers,agi 2021-01-07 08:53:08 +00:00
updaterfileutils_osx.mm