mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 1589246
- Guard against null notification when closing them on Android r=geckoview-reviewers,droeh
Differential Revision: https://phabricator.services.mozilla.com/D50642 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
ef710a9a0f
commit
545ae39527
@ -106,6 +106,10 @@ AndroidAlerts::CloseAlert(const nsAString& aAlertName,
|
||||
nsIPrincipal* aPrincipal) {
|
||||
java::WebNotification::LocalRef notification =
|
||||
mNotificationsMap.Get(aAlertName);
|
||||
if (!notification) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
java::GeckoRuntime::LocalRef runtime = java::GeckoRuntime::GetInstance();
|
||||
if (runtime != NULL) {
|
||||
runtime->NotifyOnClose(notification);
|
||||
|
Loading…
Reference in New Issue
Block a user