Bug 720427 - Save as PDF is using an invalid URI method. r=wesj
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Tue, 24 Jan 2012 09:16:56 -0800
changeset 86478 04c7c0a46c38b1ec442255dc79f474baebd25909
parent 86477 4cb1b8a6a0f6ff6fe7cc07205de3c2450f4e46fe
child 86479 4d6cb73f892bc8b8e10551e5b110f53cceadf1ba
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswesj
bugs720427
milestone12.0a1
Bug 720427 - Save as PDF is using an invalid URI method. r=wesj
mobile/android/chrome/content/browser.js
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -562,17 +562,17 @@ var BrowserApp = {
     }
 
     window.QueryInterface(Ci.nsIDOMChromeWindow).minimize();
     window.close();
   },
 
   saveAsPDF: function saveAsPDF(aBrowser) {
     // Create the final destination file location
-    let fileName = ContentAreaUtils.getDefaultFileName(aBrowser.contentTitle, aBrowser.documentURI, null, null);
+    let fileName = ContentAreaUtils.getDefaultFileName(aBrowser.contentTitle, aBrowser.currentURI, null, null);
     fileName = fileName.trim() + ".pdf";
 
     let dm = Cc["@mozilla.org/download-manager;1"].getService(Ci.nsIDownloadManager);
     let downloadsDir = dm.defaultDownloadsDirectory;
 
     let file = downloadsDir.clone();
     file.append(fileName);
     file.createUnique(file.NORMAL_FILE_TYPE, parseInt("666", 8));