Bug 1288821 - Follow-up to fix unused variable error; r=me
authorJim Chen <nchen@mozilla.com>
Thu, 04 Aug 2016 10:00:00 -0400
changeset 308215 5b972a509e33ad44c175354408ab6e3fce6c066c
parent 308214 2d03d12d868bc5cf8cf2a5960afe60ddbff15d6c
child 308216 027410f730d7567898e603289a3b6cd1cf774959
push id31092
push usercbook@mozilla.com
push dateFri, 05 Aug 2016 10:16:59 +0000
treeherderautoland@b97dd7dd3cb9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1288821
milestone51.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1288821 - Follow-up to fix unused variable error; r=me
toolkit/components/alerts/nsXULAlerts.cpp
--- a/toolkit/components/alerts/nsXULAlerts.cpp
+++ b/toolkit/components/alerts/nsXULAlerts.cpp
@@ -58,27 +58,25 @@ nsXULAlertObserver::Observe(nsISupports*
 
 // We don't cycle collect nsXULAlerts since gXULAlerts will keep the instance
 // alive till shutdown anyway.
 NS_IMPL_ISUPPORTS(nsXULAlerts, nsIAlertsService, nsIAlertsDoNotDisturb, nsIAlertsIconURI)
 
 /* static */ already_AddRefed<nsXULAlerts>
 nsXULAlerts::GetInstance()
 {
-#ifdef MOZ_WIDGET_ANDROID
   // Gecko on Android does not fully support XUL windows.
-  return nullptr;
-#else
+#ifndef MOZ_WIDGET_ANDROID
   if (!gXULAlerts) {
     gXULAlerts = new nsXULAlerts();
     ClearOnShutdown(&gXULAlerts);
   }
+#endif // MOZ_WIDGET_ANDROID
   RefPtr<nsXULAlerts> instance = gXULAlerts.get();
   return instance.forget();
-#endif // MOZ_WIDGET_ANDROID
 }
 
 NS_IMETHODIMP
 nsXULAlerts::ShowAlertNotification(const nsAString& aImageUrl, const nsAString& aAlertTitle,
                                    const nsAString& aAlertText, bool aAlertTextClickable,
                                    const nsAString& aAlertCookie, nsIObserver* aAlertListener,
                                    const nsAString& aAlertName, const nsAString& aBidi,
                                    const nsAString& aLang, const nsAString & aData,