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.

This commit is contained in:
pedemont@us.ibm.com
2004-12-17 22:25:12 +00:00
parent db558ee9cc
commit 01722acfd7
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.");