Bug 584316 - Fix DownloadManager usage of deprecated Storage binding APIs
authorShawn Wilsher <me@shawnwilsher.com>
Thu, 31 Mar 2011 10:19:31 -0700
changeset 64475 a76f473d9f9933044c828404d4fb17459a8f2a3e
parent 64474 1a80cec872cf8aae301116dcce183968008cd8a1
child 64476 23bc3e55f3bd915a559e497238207d29a8bbec99
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)
bugs584316
milestone2.2a1pre
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 584316 - Fix DownloadManager usage of deprecated Storage binding APIs r=Mardak
toolkit/mozapps/downloads/content/downloads.js
--- a/toolkit/mozapps/downloads/content/downloads.js
+++ b/toolkit/mozapps/downloads/content/downloads.js
@@ -1186,21 +1186,21 @@ function buildDownloadList(aForceBuild)
 
   // Clear the list before adding items by replacing with a shallow copy
   let (empty = gDownloadsView.cloneNode(false)) {
     gDownloadsView.parentNode.replaceChild(empty, gDownloadsView);
     gDownloadsView = empty;
   }
 
   try {
-    gStmt.bindInt32Parameter(0, nsIDM.DOWNLOAD_NOTSTARTED);
-    gStmt.bindInt32Parameter(1, nsIDM.DOWNLOAD_DOWNLOADING);
-    gStmt.bindInt32Parameter(2, nsIDM.DOWNLOAD_PAUSED);
-    gStmt.bindInt32Parameter(3, nsIDM.DOWNLOAD_QUEUED);
-    gStmt.bindInt32Parameter(4, nsIDM.DOWNLOAD_SCANNING);
+    gStmt.bindByIndex(0, nsIDM.DOWNLOAD_NOTSTARTED);
+    gStmt.bindByIndex(1, nsIDM.DOWNLOAD_DOWNLOADING);
+    gStmt.bindByIndex(2, nsIDM.DOWNLOAD_PAUSED);
+    gStmt.bindByIndex(3, nsIDM.DOWNLOAD_QUEUED);
+    gStmt.bindByIndex(4, nsIDM.DOWNLOAD_SCANNING);
   } catch (e) {
     // Something must have gone wrong when binding, so clear and quit
     gStmt.reset();
     return;
   }
 
   // Take a quick break before we actually start building the list
   gBuilder = setTimeout(function() {