From bc51f91eaea3a9fbaae7a367a5cc8a073bd27139 Mon Sep 17 00:00:00 2001 From: "peterlubczynski%netscape.com" Date: Tue, 4 Feb 2003 01:10:25 +0000 Subject: [PATCH] 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 --- mozilla/xpcom/glue/standalone/nsXPCOMGlue.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/mozilla/xpcom/glue/standalone/nsXPCOMGlue.cpp b/mozilla/xpcom/glue/standalone/nsXPCOMGlue.cpp index 60c15368462..d8101776eee 100644 --- a/mozilla/xpcom/glue/standalone/nsXPCOMGlue.cpp +++ b/mozilla/xpcom/glue/standalone/nsXPCOMGlue.cpp @@ -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;