Bug 270889 - Change params for initEmbedding() to use java.io.File and custom class. Backout lazy discovery of interface info (no longer needed). Better distribute methods in XPCOM and GeckoEmbed classes. r=darin.

git-svn-id: svn://10.0.0.236/trunk@166838 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
pedemont%us.ibm.com
2004-12-17 22:25:12 +00:00
parent c647dcab36
commit 4b2e003838
7 changed files with 298 additions and 125 deletions

View File

@@ -36,6 +36,7 @@
* ***** END LICENSE BLOCK ***** */
import org.mozilla.xpcom.*;
import java.io.*;
/**
* Adapted from xpcom/tests/TestArray.cpp
@@ -70,10 +71,10 @@ public class TestArray {
throw new RuntimeException("MOZILLA_FIVE_HOME system property not set.");
}
nsILocalFile localFile = GeckoEmbed.newLocalFile(mozillaPath, true);
File localFile = new File(mozillaPath);
GeckoEmbed.initEmbedding(localFile, null);
nsIComponentManager componentManager = GeckoEmbed.getComponentManager();
nsIComponentManager componentManager = XPCOM.getComponentManager();
nsIMutableArray array = (nsIMutableArray) componentManager.createInstanceByContractID(NS_ARRAY_CID, null, nsIMutableArray.NS_IMUTABLEARRAY_IID);
if (array == null) {
throw new RuntimeException("Failed to create nsIMutableArray.");