*rval = STRING_TO_JSVAL(JS_NewUCStringCopyN(cx, nativeRetNSStr.GetUnicode(), nativeRetNSStr.Length()));
*rval = STRING_TO_JSVAL(JS_NewUCStringCopyN(cx, NS_REINTERPRET_CAST(const jschar*, nativeRetNSStr.GetUnicode()), nativeRetNSStr.Length()));
InstallFileOpDirGetParent(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval){  nsInstall*   nativeThis = (nsInstall*)JS_GetPrivate(cx, obj);  nsCOMPtr<nsIFile>   nativeRet;  nsString     nativeRetNSStr;  JSObject *jsObj;  nsInstallFolder *folder;  *rval = JSVAL_NULL;  // If there's no private data, this must be the prototype, so ignore  if(nsnull == nativeThis)  {    return JS_TRUE;  }  //  public int DirGetParent (nsInstallFolder NativeFolderPath);  if ( argc == 0 || argv[0] == JSVAL_NULL || !JSVAL_IS_OBJECT(argv[0])) //argv[0] MUST be a jsval  {    // error, return NULL    return JS_TRUE;  }  jsObj = JSVAL_TO_OBJECT(argv[0]);  if (!JS_InstanceOf(cx, jsObj, &FileSpecObjectClass, nsnull))  {    // error, return NULL    return JS_TRUE;  }  folder = (nsInstallFolder*)JS_GetPrivate(cx, jsObj);    if(!folder || NS_OK != nativeThis->FileOpDirGetParent(*folder, getter_AddRefs(nativeRet)))  {    // error, return NULL    return JS_TRUE;  }  char* temp;  nativeRet->GetPath(&temp);  nativeRetNSStr.AssignWithConversion(temp);  *rval = STRING_TO_JSVAL(JS_NewUCStringCopyN(cx, nativeRetNSStr.GetUnicode(), nativeRetNSStr.Length()));  return JS_TRUE;}