nsJSUtils::nsConvertXPCObjectToJSVal(nativeRet, nsIController::GetIID(), cx, obj, rval);
nsJSUtils::nsConvertXPCObjectToJSVal(nativeRet, NS_GET_IID(nsIController), cx, obj, rval);
XULCommandDispatcherGetControllerForCommand(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval){  nsIDOMXULCommandDispatcher *nativeThis = (nsIDOMXULCommandDispatcher*)nsJSUtils::nsGetNativeThis(cx, obj);  nsresult result = NS_OK;  nsIController* nativeRet;  nsAutoString b0;  // If there's no private data, this must be the prototype, so ignore  if (nsnull == nativeThis) {    return JS_TRUE;  }  {  *rval = JSVAL_NULL;  {    PRBool ok;    nsresult rv;    NS_WITH_SERVICE(nsIScriptSecurityManager, secMan,                    NS_SCRIPTSECURITYMANAGER_PROGID, &rv);    if (NS_FAILED(rv)) {      return nsJSUtils::nsReportError(cx, obj, NS_ERROR_DOM_SECMAN_ERR);    }    secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_XULCOMMANDDISPATCHER_GETCONTROLLERFORCOMMAND, PR_FALSE, &ok);    if (!ok) {      return nsJSUtils::nsReportError(cx, obj, NS_ERROR_DOM_SECURITY_ERR);    }  }    if (argc < 1) {      return nsJSUtils::nsReportError(cx, obj, NS_ERROR_DOM_TOO_FEW_PARAMETERS_ERR);    }    nsJSUtils::nsConvertJSValToString(b0, cx, argv[0]);    result = nativeThis->GetControllerForCommand(b0, &nativeRet);    if (NS_FAILED(result)) {      return nsJSUtils::nsReportError(cx, obj, result);    }    // n.b., this will release nativeRet    nsJSUtils::nsConvertXPCObjectToJSVal(nativeRet, nsIController::GetIID(), cx, obj, rval);  }  return JS_TRUE;}