Bug 1698718 - Add note to GMP lib load crash to diagnose reason. r=gsvelto

Add a temporary note to this crash path to help diagnose why lib loads are
failing.

Differential Revision: https://phabricator.services.mozilla.com/D108685
This commit is contained in:
Bryce Seager van Dyk 2021-03-17 14:08:08 +00:00
parent cca901d22e
commit 2b56d0f317

View File

@ -234,6 +234,17 @@ mozilla::ipc::IPCResult GMPChild::RecvPreloadLibs(const nsCString& aLibs) {
if (libHandle) {
mLibHandles.AppendElement(libHandle);
} else {
// TODO(bug 1698718): remove the logging once we've identified
// the cause of the load failure.
const char* error = dlerror();
if (error) {
// We should always have an error, but gracefully handle just in
// case.
nsAutoCString nsError{error};
CrashReporter::AppendAppNotesToCrashReport(nsError);
}
// End bug 1698718 logging.
MOZ_CRASH("Couldn't load lib needed by NSS");
}
}