Bug 593518 - Fix 'null' appearing as title in Google Reader sharing [r=mfinkle]
authorMatt Brubeck <mbrubeck@mozilla.com>
Sun, 05 Sep 2010 07:21:12 -0700
changeset 66532 84f3af5fd282f106bc31a460ae5259b89f32935f
parent 66531 9e8f78c7823f1bd0ac2dacd02ae51b7a8a29abab
child 66533 e61598524de2a40480e035403942ac5d79a87aa8
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs593518
Bug 593518 - Fix 'null' appearing as title in Google Reader sharing [r=mfinkle]
mobile/chrome/content/browser-ui.js
--- a/mobile/chrome/content/browser-ui.js
+++ b/mobile/chrome/content/browser-ui.js
@@ -2437,34 +2437,34 @@ var SharingUI = {
 
     let bbox = document.getElementById("share-buttons-box");
     this._handlers.forEach(function(handler) {
       let button = document.createElement("button");
       button.className = "prompt-button";
       button.setAttribute("label", handler.name);
       button.addEventListener("command", function() {
         SharingUI.hide();
-        handler.callback(aURL, aTitle);
+        handler.callback(aURL || "", aTitle || "");
       }, false);
       bbox.appendChild(button);
     });
     this._dialog.waitForClose();
     BrowserUI.popPopup();
   },
 
   hide: function hide() {
     this._dialog.close();
     this._dialog = null;
   },
 
   _handlers: [
     {
       name: "Email",
       callback: function callback(aURL, aTitle) {
-        let url = "mailto:?subject=" + encodeURIComponent(aTitle || "") +
+        let url = "mailto:?subject=" + encodeURIComponent(aTitle) +
                   "&body=" + encodeURIComponent(aURL);
         let uri = Services.io.newURI(url, null, null);
         let extProtocolSvc = Cc["@mozilla.org/uriloader/external-protocol-service;1"]
                              .getService(Ci.nsIExternalProtocolService);
         extProtocolSvc.loadUrl(uri);
       }
     },
     {