Bug 1016629 - f. Don't call dl_iterate_phdr if it's not available; r=BenWa

This commit is contained in:
Jim Chen 2014-07-28 13:30:21 -04:00
parent eb155cafc1
commit 124095606a

View File

@ -68,6 +68,15 @@ SharedLibraryInfo SharedLibraryInfo::GetInfoForSelf()
SharedLibraryInfo info;
#if !defined(MOZ_WIDGET_GONK)
#ifdef ANDROID
if (!dl_iterate_phdr) {
// On ARM Android, dl_iterate_phdr is provided by the custom linker.
// So if libxul was loaded by the system linker (e.g. as part of
// xpcshell when running tests), it won't be available and we should
// not call it.
return info;
}
#endif
dl_iterate_phdr(dl_iterate_callback, &info);
#ifndef ANDROID
return info;