Bug 770491 - Fix leak introduced by System Message Handler API. r=khuey

This commit is contained in:
Mounir Lamouri 2012-07-03 15:49:56 +02:00
parent bc46f77176
commit 02510f05bf

View File

@ -10678,14 +10678,9 @@ nsGlobalWindow::SetIsApp(bool aValue)
bool
nsGlobalWindow::IsPartOfApp()
{
mozIDOMApplication* app;
nsresult rv = GetApp(&app);
nsCOMPtr<mozIDOMApplication> app;
if (NS_FAILED(rv)) {
return false;
}
return app != nsnull;
return NS_SUCCEEDED(GetApp(getter_AddRefs(app))) ? app != nsnull : false;
}
nsresult