Bug 595625 - AutoCompleteCache does not use the new getLabelAt method [r=mfinkle]
authorVivien Nicolas <21@vingtetun.org>
Sun, 12 Sep 2010 16:22:16 +0200
changeset 66569 5e510316ec4a7092230d301c20009949886c685b
parent 66568 f2b6d43506dc81a744e116c818920dccf72aea6b
child 66570 e9937943b960bbecb64950a2fb771f8f0c65e8ff
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
bugs595625
Bug 595625 - AutoCompleteCache does not use the new getLabelAt method [r=mfinkle]
mobile/components/AutoCompleteCache.js
mobile/components/LoginManager.js
--- a/mobile/components/AutoCompleteCache.js
+++ b/mobile/components/AutoCompleteCache.js
@@ -203,16 +203,17 @@ var AutoCompleteUtils = {
         this.fetch(this.query);
         return;
       }
 
       let result = cache.result;
 
       // Add back functions to the result
       result.getValueAt = function(index) this.data[index][0];
+      result.getLabelAt = function(index) this.data[index][0];
       result.getCommentAt = function(index) this.data[index][1];
       result.getStyleAt = function(index) this.data[index][2];
       result.getImageAt = function(index) this.data[index][3];
 
       this.cache = result;
     } catch (ex) {
       Cu.reportError("AutoCompleteUtils: Could not read from cache file: " + ex);
     }
--- a/mobile/components/LoginManager.js
+++ b/mobile/components/LoginManager.js
@@ -679,16 +679,20 @@ UserAutoCompleteResult.prototype = {
 
     getValueAt : function (index) {
         if (index < 0 || index >= this.logins.length)
             throw "Index out of range.";
 
         return this.logins[index].username;
     },
 
+    getLabelAt : function (index) {
+      return this.getValueAt(index);
+    },
+
     getCommentAt : function (index) {
         return "";
     },
 
     getStyleAt : function (index) {
         return "";
     },