Bug 406028: Call callback immediately when install is blocked. r+sr=dveditz,

a=schrep


git-svn-id: svn://10.0.0.236/trunk@243196 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dtownsend%oxymoronical.com
2008-01-16 09:49:47 +00:00
parent d3f6ec4901
commit 5008052d82
2 changed files with 7 additions and 8 deletions

View File

@@ -374,13 +374,6 @@ InstallTriggerGlobalInstall(JSContext *cx, JSObject *obj, uintN argc, jsval *arg
}
// save callback function if any (ignore bad args for now)
if ( argc >= 2 && JS_TypeOfValue(cx,argv[1]) == JSTYPE_FUNCTION )
{
trigger->SaveCallback( cx, argv[1] );
}
// pass on only if good stuff found
if (!abortLoad && trigger->Size() > 0)
{
@@ -407,6 +400,12 @@ InstallTriggerGlobalInstall(JSContext *cx, JSObject *obj, uintN argc, jsval *arg
}
else
{
// save callback function if any (ignore bad args for now)
if ( argc >= 2 && JS_TypeOfValue(cx,argv[1]) == JSTYPE_FUNCTION )
{
trigger->SaveCallback( cx, argv[1] );
}
PRBool result;
nativeThis->StartInstall(installInfo, &result);
*rval = BOOLEAN_TO_JSVAL(result);

View File

@@ -55,8 +55,8 @@ public:
private:
~nsXPIInstallInfo();
nsXPITriggerInfo* mTriggerInfo;
nsCOMPtr<nsIDOMWindowInternal> mOriginatingWindow;
nsCOMPtr<nsIURI> mOriginatingURI;
nsXPITriggerInfo* mTriggerInfo;
PRUint32 mChromeType;
};