gecko-dev/mozglue
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
..
android Bug 1690384: Propagate error information up through XPCOMGlueLoad and GetBootstrap; r=glandium 2021-02-23 23:25:22 +00:00
baseprofiler Bug 1693037 - Fix non-MOZ_GECKO_PROFILER builds - r=florian 2021-02-17 22:36:28 +00:00
build Bug 1683439 - Remove suppression for fixed issue. r=KrisWright 2021-02-05 17:22:06 +00:00
dllservices Bug 1634090 - Block McAfee DLP's module v11.6 or older. r=gcp 2021-01-26 21:09:53 +00:00
linker Bug 1654103: Standardize on Black for Python code in `mozilla-central`. 2020-10-26 18:34:53 +00:00
misc Backed out 5 changesets (bug 1690167) for failing xpcshell at bootstrapSvc.js on a CLOSED TREE 2021-02-17 07:10:58 +02:00
static Bug 1617369 - Reformat mozglue/ using rustfmt r=glandium 2020-03-04 06:12:38 +00:00
tests Backed out 5 changesets (bug 1690167) for failing xpcshell at bootstrapSvc.js on a CLOSED TREE 2021-02-17 07:10:58 +02:00
moz.build Bug 1654103: Standardize on Black for Python code in `mozilla-central`. 2020-10-26 18:34:53 +00:00