Bug 909640 - Fix js warnings in shell.js r=gwagner
authorFabrice Desré <fabrice@mozilla.com>
Tue, 27 Aug 2013 15:11:16 -0700
changeset 144493 476d8c13abe0021d3ff1e38f97f18da901a01884
parent 144492 49e21f2559fec1e09cfa8120f45c58d40d18ede0
child 144494 bb87536587fae85c44d166a750c27cc756bfb7d8
push id25165
push userryanvm@gmail.com
push dateWed, 28 Aug 2013 00:22:24 +0000
treeherdermozilla-central@8b4c3606442d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgwagner
bugs909640
milestone26.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 909640 - Fix js warnings in shell.js r=gwagner
b2g/chrome/content/shell.js
--- a/b2g/chrome/content/shell.js
+++ b/b2g/chrome/content/shell.js
@@ -752,16 +752,19 @@ var AlertsHelper = {
         for (let i = 0; i < messages.length; i++) {
           let message = messages[i];
           if (message === "notification") {
             return helper.fullLaunchPath();
           } else if (typeof message == "object" && "notification" in message) {
             return helper.resolveFromOrigin(message["notification"]);
           }
         }
+
+        // No message found...
+        return null;
       }
 
       listener.target = getNotificationURLFor(manifest.messages);
 
       // Bug 816944 - Support notification messages for entry_points.
     });
   },
 
@@ -828,17 +831,17 @@ var AlertsHelper = {
       id: name
     });
   },
 
   receiveMessage: function alert_receiveMessage(aMessage) {
     if (!aMessage.target.assertAppHasPermission("desktop-notification")) {
       Cu.reportError("Desktop-notification message " + aMessage.name +
                      " from a content process with no desktop-notification privileges.");
-      return null;
+      return;
     }
 
     let data = aMessage.data;
     let listener = {
       mm: aMessage.target,
       title: data.title,
       text: data.text,
       manifestURL: data.manifestURL,