зеркало из https://github.com/mozilla/gecko-dev.git
Bug 516124 - Crash [@ nsAlertsIconListener::SendClosed], r=roc.
This commit is contained in:
Родитель
192e0a3b83
Коммит
45e4e6f027
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче