Bug 942780: fix misuse of MMS.Address.resolveType in MobileMessageDatabaseService. r=gene
authorVicamo Yang <vyang@mozilla.com>
Tue, 26 Nov 2013 17:29:23 +0800
changeset 157605 f66d18acab456448d39e61df6cfa1f3c7670b956
parent 157604 bc2395b24822120d2747fe85c9c827072229fb5c
child 157606 76ab553ee4fe1aa8ef3389b0a847b9264381a1ed
push id25717
push userkwierso@gmail.com
push dateWed, 27 Nov 2013 01:34:26 +0000
treeherdermozilla-central@a6a046acc881 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgene
bugs942780
milestone28.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 942780: fix misuse of MMS.Address.resolveType in MobileMessageDatabaseService. r=gene
dom/mobilemessage/src/gonk/MobileMessageDatabaseService.js
--- a/dom/mobilemessage/src/gonk/MobileMessageDatabaseService.js
+++ b/dom/mobilemessage/src/gonk/MobileMessageDatabaseService.js
@@ -1776,25 +1776,31 @@ MobileMessageDatabaseService.prototype =
         insertMessageRecord(threadId);
       };
     });
   },
 
   forEachMatchedMmsDeliveryInfo:
     function forEachMatchedMmsDeliveryInfo(aDeliveryInfo, aNeedle, aCallback) {
 
-    let typedAddress = MMS.Address.resolveType(aNeedle);
+    let typedAddress = {
+      type: MMS.Address.resolveType(aNeedle),
+      address: aNeedle
+    };
     let normalizedAddress, parsedAddress;
     if (typedAddress.type === "PLMN") {
       normalizedAddress = PhoneNumberUtils.normalize(aNeedle, false);
       parsedAddress = PhoneNumberUtils.parse(normalizedAddress);
     }
 
     for (let element of aDeliveryInfo) {
-      let typedStoredAddress = MMS.Address.resolveType(element.receiver);
+      let typedStoredAddress = {
+        type: MMS.Address.resolveType(element.receiver),
+        address: element.receiver
+      };
       if (typedAddress.type !== typedStoredAddress.type) {
         // Not even my type.  Skip.
         continue;
       }
 
       if (typedAddress.address == typedStoredAddress.address) {
         // Have a direct match.
         aCallback(element);