Skip to content
Snippets Groups Projects
Commit 45e4e6f0 authored by Florian Queze's avatar Florian Queze
Browse files

Bug 516124 - Crash [@ nsAlertsIconListener::SendClosed], r=roc.

parent 192e0a3b
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,8 @@ const Ci = Components.interfaces;
try {
var notifier = Cc["@mozilla.org/alerts-service;1"].
getService(Ci.nsIAlertsService);
notifier.showAlertNotification(null, "Notification test", "Surprise! I'm here to test a notification without observer!",
false, "foobarcookie", null);
notifier.showAlertNotification(null, "Notification test", "Surprise! I'm here to test notifications!",
false, "foobarcookie", observer);
......
......@@ -250,13 +250,17 @@ nsAlertsIconListener::StartRequest(const nsAString & aImageUrl)
void
nsAlertsIconListener::SendCallback()
{
mAlertListener->Observe(NULL, "alertclickcallback", mAlertCookie.get());
if (mAlertListener) {
mAlertListener->Observe(NULL, "alertclickcallback", mAlertCookie.get());
}
}
void
nsAlertsIconListener::SendClosed()
{
mAlertListener->Observe(NULL, "alertfinished", mAlertCookie.get());
if (mAlertListener) {
mAlertListener->Observe(NULL, "alertfinished", mAlertCookie.get());
}
}
nsresult
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment