if (!aIID) { inst = new JavaXPCOMInstance(aXPCOMObject, nsnull); } else {  nsCOMPtr<nsIInterfaceInfoManager> iim = XPTI_GetInterfaceInfoManager(); NS_ASSERTION(iim != nsnull, "Failed to get InterfaceInfoManager"); if (iim) { nsCOMPtr<nsIInterfaceInfo> info; iim->GetInfoForIID(aIID, getter_AddRefs(info));
nsCOMPtr<nsIInterfaceInfoManager> iim = XPTI_GetInterfaceInfoManager(); NS_ASSERTION(iim != nsnull, "Failed to get InterfaceInfoManager"); if (iim) { nsCOMPtr<nsIInterfaceInfo> info; iim->GetInfoForIID(aIID, getter_AddRefs(info));
CreateJavaXPCOMInstance(nsISupports* aXPCOMObject, const nsIID* aIID){  JavaXPCOMInstance* inst = nsnull;  // We can't call XPTI_GetInterfaceInfoManager() before NS_InitEmbedding(),  // so for NS_NewLocalFile (which can be called before NS_InitEmbedding), we  // pass in a null aIID, and create the interface info lazily later.  if (!aIID) {    inst = new JavaXPCOMInstance(aXPCOMObject, nsnull);  } else {    // Get interface info for class    nsCOMPtr<nsIInterfaceInfoManager> iim = XPTI_GetInterfaceInfoManager();    NS_ASSERTION(iim != nsnull, "Failed to get InterfaceInfoManager");    if (iim) {      nsCOMPtr<nsIInterfaceInfo> info;      iim->GetInfoForIID(aIID, getter_AddRefs(info));      // Wrap XPCOM object      inst = new JavaXPCOMInstance(aXPCOMObject, info);    }  }  return inst;}