Bug 1013263 - fix -Wmaybe-uninitialized warning in Notification.cpp; r=mhenretty

This commit is contained in:
Nathan Froyd 2014-05-20 09:26:36 -04:00
parent 79b4ed3c82
commit 39a01f9600

View File

@ -772,14 +772,13 @@ void
Notification::CloseInternal()
{
if (!mIsClosed) {
nsresult rv;
// Don't bail out if notification storage fails, since we still
// want to send the close event through the alert service.
nsCOMPtr<nsINotificationStorage> notificationStorage =
do_GetService(NS_NOTIFICATION_STORAGE_CONTRACTID);
if (notificationStorage) {
nsString origin;
rv = GetOrigin(GetOwner(), origin);
nsresult rv = GetOrigin(GetOwner(), origin);
if (NS_SUCCEEDED(rv)) {
notificationStorage->Delete(origin, mID);
}
@ -788,9 +787,7 @@ Notification::CloseInternal()
nsCOMPtr<nsIAlertsService> alertService =
do_GetService(NS_ALERTSERVICE_CONTRACTID);
if (alertService) {
if (NS_SUCCEEDED(rv)) {
alertService->CloseAlert(mAlertName, GetPrincipal());
}
alertService->CloseAlert(mAlertName, GetPrincipal());
}
}
}