nativeRetNSStr = nativeRet.GetNativePathCString(); *rval = STRING_TO_JSVAL(JS_NewUCStringCopyN(cx, nativeRetNSStr.GetUnicode(), nativeRetNSStr.Length()));
folder = (nsInstallFolder*)JS_GetPrivate(cx, jsObj);  if(!folder || NS_OK != nativeThis->FileOpDirGetParent(*folder, &nativeRet)) {  return JS_TRUE;
InstallFileOpDirGetParent(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval){  nsInstall*   nativeThis = (nsInstall*)JS_GetPrivate(cx, obj);  nsFileSpec   nativeRet;  nsAutoString b0;  nsString     nativeRetNSStr;  *rval = JSVAL_NULL;  // If there's no private data, this must be the prototype, so ignore  if(nsnull == nativeThis)  {    return JS_TRUE;  }  if(argc >= 1)  {    //  public int DirGetParent (String NativeFolderPath);    ConvertJSValToStr(b0, cx, argv[0]);    nsFileSpec fsB0(b0);    if(NS_OK != nativeThis->FileOpDirGetParent(fsB0, &nativeRet))    {      return JS_FALSE;    }    nativeRetNSStr = nativeRet.GetNativePathCString();    *rval = STRING_TO_JSVAL(JS_NewUCStringCopyN(cx, nativeRetNSStr.GetUnicode(), nativeRetNSStr.Length()));  }  else  {    JS_ReportError(cx, "Function DirGetParent requires 1 parameter");    return JS_FALSE;  }  return JS_TRUE;}