Bug 944309: Change null check for window from assert to full check/fail in Notification.cpp; r=mrbkap r=mhenretty

This commit is contained in:
Kyle Machulis 2013-12-05 15:26:04 -08:00
parent 388fd461c3
commit 1d80d9000a

View File

@ -734,9 +734,9 @@ void
Notification::Close()
{
// Queue a task to close the notification.
nsCOMPtr<nsIRunnable> showNotificationTask =
nsCOMPtr<nsIRunnable> closeNotificationTask =
new NotificationTask(this, NotificationTask::eClose);
NS_DispatchToMainThread(showNotificationTask);
NS_DispatchToMainThread(closeNotificationTask);
}
void
@ -771,7 +771,9 @@ Notification::CloseInternal()
nsresult
Notification::GetOrigin(nsPIDOMWindow* aWindow, nsString& aOrigin)
{
MOZ_ASSERT(aWindow);
if (!aWindow) {
return NS_ERROR_FAILURE;
}
nsresult rv;
nsIDocument* doc = aWindow->GetExtantDoc();
NS_ENSURE_TRUE(doc, NS_ERROR_UNEXPECTED);