зеркало из https://github.com/mozilla/pjs.git
doing my part for bug 8227
This commit is contained in:
Родитель
fee8b8f942
Коммит
4ce4016bd1
|
@ -922,6 +922,13 @@ int main()
|
|||
JSBool success = JS_TRUE;
|
||||
MySecMan* sm = new MySecMan();
|
||||
|
||||
if(!sm)
|
||||
{
|
||||
success = JS_FALSE;
|
||||
printf("failed to create SecurityManager!\n");
|
||||
goto sm_test_done;
|
||||
}
|
||||
|
||||
rval = JSVAL_FALSE;
|
||||
JS_SetProperty(jscontext, glob, "failed", &rval);
|
||||
printf("Individual SecurityManager tests...\n");
|
||||
|
|
|
@ -192,9 +192,17 @@ xpctest::ConstructChild(nsISupports *aOuter, REFNSIID aIID, void **aResult)
|
|||
nsresult rv;
|
||||
NS_ASSERTION(aOuter == nsnull, "no aggregation");
|
||||
xpctestChild* obj = new xpctestChild();
|
||||
rv = obj->QueryInterface(aIID, aResult);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "unable to find correct interface");
|
||||
NS_RELEASE(obj);
|
||||
if(obj)
|
||||
{
|
||||
rv = obj->QueryInterface(aIID, aResult);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "unable to find correct interface");
|
||||
NS_RELEASE(obj);
|
||||
}
|
||||
else
|
||||
{
|
||||
*aResult = nsnull;
|
||||
rv = NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
/***************************************************************************/
|
||||
|
|
|
@ -288,8 +288,18 @@ xpctest::ConstructEcho(nsISupports *aOuter, REFNSIID aIID, void **aResult)
|
|||
nsresult rv;
|
||||
NS_ASSERTION(aOuter == nsnull, "no aggregation");
|
||||
xpctestEcho* obj = new xpctestEcho();
|
||||
rv = obj->QueryInterface(aIID, aResult);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "unable to find correct interface");
|
||||
NS_RELEASE(obj);
|
||||
|
||||
if(obj)
|
||||
{
|
||||
rv = obj->QueryInterface(aIID, aResult);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "unable to find correct interface");
|
||||
NS_RELEASE(obj);
|
||||
}
|
||||
else
|
||||
{
|
||||
*aResult = nsnull;
|
||||
rv = NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
|
|
@ -112,9 +112,19 @@ xpctest::ConstructNoisy(nsISupports *aOuter, REFNSIID aIID, void **aResult)
|
|||
nsresult rv;
|
||||
NS_ASSERTION(aOuter == nsnull, "no aggregation");
|
||||
xpctestNoisy* obj = new xpctestNoisy();
|
||||
rv = obj->QueryInterface(aIID, aResult);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "unable to find correct interface");
|
||||
NS_RELEASE(obj);
|
||||
|
||||
if(obj)
|
||||
{
|
||||
rv = obj->QueryInterface(aIID, aResult);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "unable to find correct interface");
|
||||
NS_RELEASE(obj);
|
||||
}
|
||||
else
|
||||
{
|
||||
*aResult = nsnull;
|
||||
rv = NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
/***************************************************************************/
|
||||
|
|
Загрузка…
Ссылка в новой задаче