From 220b6b0fa25bd121a9b653683a6fa405eba331e6 Mon Sep 17 00:00:00 2001 From: "pedemont%us.ibm.com" Date: Wed, 27 Sep 2006 15:13:12 +0000 Subject: [PATCH] Bug 316090 - GREImpl.loadDependentLibraries hardcodes the list, and turn javaxpcom on by default for XULRunner, patch by jhpedemonte and myself with co-review Original committer: bsmedberg%covad.net Original revision: 1.2 Original date: 2005/12/15 14:17:18 git-svn-id: svn://10.0.0.236/trunk@212523 18797224-902f-48f8-a5cc-f745e15eee43 --- .../org/mozilla/xpcom/internal/GREImpl.java | 31 +++---------------- 1 file changed, 5 insertions(+), 26 deletions(-) diff --git a/mozilla/extensions/java/xpcom/src/org/mozilla/xpcom/internal/GREImpl.java b/mozilla/extensions/java/xpcom/src/org/mozilla/xpcom/internal/GREImpl.java index 83fc74c6734..8df7d6012a5 100644 --- a/mozilla/extensions/java/xpcom/src/org/mozilla/xpcom/internal/GREImpl.java +++ b/mozilla/extensions/java/xpcom/src/org/mozilla/xpcom/internal/GREImpl.java @@ -45,35 +45,14 @@ public class GREImpl implements IGRE { public void initEmbedding(File aLibXULDirectory, File aAppDirectory, IAppFileLocProvider aAppDirProvider) { - loadDependentLibraries(aLibXULDirectory); - initEmbeddingNative(aLibXULDirectory, aAppDirectory, aAppDirProvider); - } - - private void loadDependentLibraries(File binPath) { + // load JNI library String path = ""; - if (binPath != null) { - path = binPath + File.separator; + if (aLibXULDirectory != null) { + path = aLibXULDirectory + File.separator; } + System.load(path + System.mapLibraryName("javaxpcomglue")); - System.load(path + System.mapLibraryName("nspr4")); - System.load(path + System.mapLibraryName("plds4")); - System.load(path + System.mapLibraryName("plc4")); - try { - /* try loading Win32 DLL */ - System.load(path + System.mapLibraryName("js3250")); - } catch (UnsatisfiedLinkError e) { } - try { - /* try loading Linux DLL */ - System.load(path + System.mapLibraryName("mozjs")); - } catch (UnsatisfiedLinkError e) { } - System.load(path + System.mapLibraryName("softokn3")); - System.load(path + System.mapLibraryName("nss3")); - System.load(path + System.mapLibraryName("smime3")); - System.load(path + System.mapLibraryName("ssl3")); - System.load(path + System.mapLibraryName("xul")); - System.load(path + System.mapLibraryName("xpcom")); - - System.load(path + System.mapLibraryName("javaxpcom")); + initEmbeddingNative(aLibXULDirectory, aAppDirectory, aAppDirProvider); } public native void initEmbeddingNative(File aLibXULDirectory,