This is the XPInstall side of bug 62167 that uses nsIProcess which was checked in earlier. a,r=dvedtiz sr=mscott

git-svn-id: svn://10.0.0.236/trunk@85593 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dbragg%netscape.com
2001-01-27 00:05:08 +00:00
parent 50228758c5
commit bd2b3a4d06
8 changed files with 99 additions and 59 deletions

View File

@@ -466,6 +466,7 @@ InstallFileOpFileExecute(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
nsInstall *nativeThis = (nsInstall*)JS_GetPrivate(cx, obj);
PRInt32 nativeRet;
nsAutoString b1;
PRBool blocking = PR_FALSE;
JSObject *jsObj;
nsInstallFolder *folder;
@@ -477,12 +478,30 @@ InstallFileOpFileExecute(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
return JS_TRUE;
}
if(argc >= 2)
if(argc >= 3)
{
// public int FileExecute (nsInstallFolder aSourceFolder,
// String aParameters);
// String aParameters
// PRBool aBlocking);
ConvertJSValToStr(b1, cx, argv[1]);
ConvertJSValToBool(&blocking, cx, argv[2]);
}
else if(argc >= 2)
{
if(JSVAL_IS_BOOLEAN(argv[1]))
{
// public int FileExecute (nsInstallFolder aSourceFolder,
// PRBool aBlocking);
ConvertJSValToBool(&blocking, cx, argv[1]);
b1.SetLength(0);
}
else
{
// public int FileExecute (nsInstallFolder aSourceFolder,
// String aParameters);
ConvertJSValToStr(b1, cx, argv[1]);
}
}
else
b1.SetLength(0);
@@ -503,7 +522,7 @@ InstallFileOpFileExecute(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
folder = (nsInstallFolder*)JS_GetPrivate(cx, jsObj);
if(NS_OK != nativeThis->FileOpFileExecute(*folder, b1, &nativeRet))
if(NS_OK != nativeThis->FileOpFileExecute(*folder, b1, blocking, &nativeRet))
{
return JS_TRUE;
}