Nomenclature change. No bug.
git-svn-id: svn://10.0.0.236/trunk@186168 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -51,7 +51,7 @@ public class Mozilla implements IGRE, IXPCOM, IXPCOMError {
|
||||
|
||||
private static Mozilla mozillaInstance = new Mozilla();
|
||||
|
||||
private static final String JAVACONNECT_JAR = "javaconnect.jar";
|
||||
private static final String JAVAXPCOM_JAR = "javaxpcom.jar";
|
||||
|
||||
private IGRE gre = null;
|
||||
|
||||
@@ -73,7 +73,7 @@ public class Mozilla implements IGRE, IXPCOM, IXPCOMError {
|
||||
/**
|
||||
* Locates the path of a GRE with the specified properties. This method
|
||||
* will only return GREs that support Java embedding (looks for the
|
||||
* presence of "javaconnect.jar").
|
||||
* presence of "javaxpcom.jar").
|
||||
* <p>
|
||||
* Currently this uses a "first-fit" algorithm, it does not select
|
||||
* the newest available GRE.
|
||||
@@ -194,7 +194,7 @@ public class Mozilla implements IGRE, IXPCOM, IXPCOMError {
|
||||
File xpcomLib = new File(xulDir, "libxpcom.dylib");
|
||||
if (xpcomLib.canRead()) {
|
||||
File grePath = xpcomLib.getCanonicalFile().getParentFile();
|
||||
File jar = new File(grePath, JAVACONNECT_JAR);
|
||||
File jar = new File(grePath, JAVAXPCOM_JAR);
|
||||
if (jar.canRead()) {
|
||||
// found GRE
|
||||
return grePath;
|
||||
@@ -224,7 +224,7 @@ public class Mozilla implements IGRE, IXPCOM, IXPCOMError {
|
||||
for (int i = 0; i < files.length; i++) {
|
||||
if (checkVersion(files[i].getName(), aVersions)) {
|
||||
File xpcomLib = new File(files[i], "libxpcom.dylib");
|
||||
File jar = new File(files[i], JAVACONNECT_JAR);
|
||||
File jar = new File(files[i], JAVAXPCOM_JAR);
|
||||
if (xpcomLib.canRead() && jar.canRead()) {
|
||||
return files[i];
|
||||
}
|
||||
@@ -382,7 +382,7 @@ public class Mozilla implements IGRE, IXPCOM, IXPCOMError {
|
||||
File grePath = new File(pathStr);
|
||||
if (grePath.exists()) {
|
||||
File xpcomLib = new File(grePath, "xpcom.dll");
|
||||
File jar = new File(grePath, JAVACONNECT_JAR);
|
||||
File jar = new File(grePath, JAVAXPCOM_JAR);
|
||||
if (xpcomLib.canRead() && jar.canRead()) {
|
||||
// found a good GRE
|
||||
return grePath;
|
||||
@@ -499,7 +499,7 @@ public class Mozilla implements IGRE, IXPCOM, IXPCOMError {
|
||||
File grePath = new File(pathStr);
|
||||
if (grePath.exists()) {
|
||||
File xpcomLib = new File(grePath, "libxpcom.so");
|
||||
File jar = new File(grePath, JAVACONNECT_JAR);
|
||||
File jar = new File(grePath, JAVAXPCOM_JAR);
|
||||
if (xpcomLib.canRead() && jar.canRead()) {
|
||||
// found a good GRE
|
||||
return grePath;
|
||||
@@ -584,7 +584,7 @@ public class Mozilla implements IGRE, IXPCOM, IXPCOMError {
|
||||
*/
|
||||
public void initEmbedding(File aLibXULDirectory, File aAppDirectory,
|
||||
IAppFileLocProvider aAppDirProvider) throws XPCOMException {
|
||||
loadJavaconnect(aLibXULDirectory, true);
|
||||
loadJavaXPCOM(aLibXULDirectory, true);
|
||||
gre.initEmbedding(aLibXULDirectory, aAppDirectory, aAppDirProvider);
|
||||
}
|
||||
|
||||
@@ -593,9 +593,9 @@ public class Mozilla implements IGRE, IXPCOM, IXPCOMError {
|
||||
* @param aLoadGREImpl
|
||||
* @throws XPCOMException
|
||||
*/
|
||||
private void loadJavaconnect(File aLibXULDirectory, boolean aLoadGREImpl)
|
||||
private void loadJavaXPCOM(File aLibXULDirectory, boolean aLoadGREImpl)
|
||||
throws XPCOMException {
|
||||
File jar = new File(aLibXULDirectory, JAVACONNECT_JAR);
|
||||
File jar = new File(aLibXULDirectory, JAVAXPCOM_JAR);
|
||||
if (!jar.exists()) {
|
||||
throw new XPCOMException(NS_ERROR_FILE_INVALID_PATH);
|
||||
}
|
||||
@@ -667,7 +667,7 @@ public class Mozilla implements IGRE, IXPCOM, IXPCOMError {
|
||||
*/
|
||||
public nsIServiceManager initXPCOM(File aMozBinDirectory,
|
||||
IAppFileLocProvider aAppFileLocProvider) throws XPCOMException {
|
||||
loadJavaconnect(aMozBinDirectory, false);
|
||||
loadJavaXPCOM(aMozBinDirectory, false);
|
||||
return xpcom.initXPCOM(aMozBinDirectory, aAppFileLocProvider);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user