Bug 782136 - add carrier field and ContactField interface to Contacts API. Review Comments. r=fabrice
authorGregor Wagner <anygregor@gmail.com>
Wed, 15 Aug 2012 17:49:47 -0700
changeset 102489 01a3cbde459cb95f5404523010c16571b3fc52f2
parent 102488 12d306fa30d5c0674a473c0fabb0590ae6c86e68
child 102490 d60761f2ce8928ad842dcd6ec21557c69f6ef511
push id23288
push useremorley@mozilla.com
push dateThu, 16 Aug 2012 13:14:48 +0000
treeherdermozilla-central@3940df6f9356 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfabrice
bugs782136
milestone17.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 782136 - add carrier field and ContactField interface to Contacts API. Review Comments. r=fabrice
dom/contacts/fallback/ContactDB.jsm
--- a/dom/contacts/fallback/ContactDB.jsm
+++ b/dom/contacts/fallback/ContactDB.jsm
@@ -123,17 +123,17 @@ ContactDB.prototype = {
             cursor.continue();
           }
         };
 
         // Create new searchable indexes.
         objectStore.createIndex("email", "search.email", { unique: false, multiEntry: true });
       } else if (currVersion == 3) {
         debug("upgrade 3");
- 
+
         if (!objectStore) {
           objectStore = aTransaction.objectStore(STORE_NAME);
         }
 
         // Upgrade existing impp field in the DB.
         objectStore.openCursor().onsuccess = function(event) {
           let cursor = event.target.result;
           if (cursor) {
@@ -212,17 +212,17 @@ ContactDB.prototype = {
           if (aContact.properties[field][i]) {
             if (field == "tel") {
               // Special case telephone number.
               // "+1-234-567" should also be found with 1234, 234-56, 23456
 
               // Chop off the first characters
               let number = aContact.properties[field][i].value;
               if (number) {
-                for(let i = 0; i < number.length; i++) {
+                for (let i = 0; i < number.length; i++) {
                   contact.search[field].push(number.substring(i, number.length));
                 }
                 // Store +1-234-567 as ["1234567", "234567"...]
                 let digits = number.match(/\d/g);
                 if (digits && number.length != digits.length) {
                   digits = digits.join('');
                   for(let i = 0; i < digits.length; i++) {
                     contact.search[field].push(digits.substring(i, digits.length));