inst = CreateJavaXPCOMInstance(file, &NS_GET_IID(nsILocalFile));
rv = CreateJavaXPCOMInstance(file, &NS_GET_IID(nsILocalFile), &inst);
XPCOM_NATIVE(newLocalFile) (JNIEnv *env, jclass, jstring aPath,                            jboolean aFollowLinks){  jobject java_stub = nsnull;  // Create a Mozilla string from the jstring  jboolean isCopy;  const PRUnichar* buf = nsnull;  if (aPath) {    buf = env->GetStringChars(aPath, &isCopy);  }  nsAutoString path_str(buf);  if (isCopy) {    env->ReleaseStringChars(aPath, buf);  }  // Make call to given function  nsILocalFile* file = nsnull;  nsresult rv = NS_NewLocalFile(path_str, aFollowLinks, &file);  if (NS_SUCCEEDED(rv)) {    // wrap xpcom instance    JavaXPCOMInstance* inst;    inst = CreateJavaXPCOMInstance(file, &NS_GET_IID(nsILocalFile));    NS_RELEASE(file);   // JavaXPCOMInstance has owning ref    if (inst) {      // create java stub      java_stub = CreateJavaWrapper(env, "nsILocalFile");      if (java_stub) {        // Associate XPCOM object w/ Java stub        AddJavaXPCOMBinding(env, java_stub, inst);      }    }  }  if (java_stub == nsnull)    ThrowXPCOMException(env, rv, "Failure in newLocalFile");  return java_stub;}