Fixing bug 189461, Java plugin fails to load because it can't find xpcom symbols so load the library with flag PR_LD_GLOBAL, patch by Ken Herron kherron@squm.mci.com r=peterl sr=dougt a=dbaron

git-svn-id: svn://10.0.0.236/trunk@137343 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
peterlubczynski%netscape.com
2003-02-04 01:10:25 +00:00
parent 82722bc526
commit bc51f91eae

View File

@@ -58,13 +58,15 @@ nsresult NS_COM XPCOMGlueStartup(const char* xpcomFile)
return NS_OK;
#else
nsresult rv;
const char* libFile;
PRLibSpec libSpec;
libSpec.type = PR_LibSpec_Pathname;
if (!xpcomFile)
libFile = XPCOM_DLL;
libSpec.value.pathname = XPCOM_DLL;
else
libFile = xpcomFile;
libSpec.value.pathname = xpcomFile;
xpcomLib = PR_LoadLibrary(libFile);
xpcomLib = PR_LoadLibraryWithFlags(libSpec, PR_LD_LAZY|PR_LD_GLOBAL);
if (!xpcomLib)
return NS_ERROR_FAILURE;
@@ -87,7 +89,7 @@ nsresult NS_COM XPCOMGlueStartup(const char* xpcomFile)
xpcomFunctions->version = XPCOM_GLUE_VERSION;
xpcomFunctions->size = sizeof(XPCOMFunctions);
rv = (*function)(xpcomFunctions, libFile);
rv = (*function)(xpcomFunctions, libSpec.value.pathname);
if (NS_FAILED(rv)) {
free(xpcomFunctions);
xpcomFunctions = nsnull;