Bug 1003839 - Live bookmark is still created despite cancelling the subscription. r=mak, a=lsblakk
authorAsaf Romano <mano@mozilla.com>
Wed, 21 May 2014 06:58:32 +0300
changeset 192360 9b9c4281ccb2
parent 192359 82c33d14844a
child 192361 af6bb6bacb0e
push id3583
push userryanvm@gmail.com
push date2014-05-22 12:45 +0000
treeherdermozilla-beta@eac674ed7cfe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak, lsblakk
bugs1003839
milestone30.0
Bug 1003839 - Live bookmark is still created despite cancelling the subscription. r=mak, a=lsblakk
toolkit/components/places/PlacesUtils.jsm
--- a/toolkit/components/places/PlacesUtils.jsm
+++ b/toolkit/components/places/PlacesUtils.jsm
@@ -2200,20 +2200,20 @@ PlacesCreateLivemarkTransaction.prototyp
           PlacesUtils.setAnnotationsForItem(this.item.id,
                                             this.item.annotations);
         }
       }, Cu.reportError);
   },
 
   undoTransaction: function CLTXN_undoTransaction()
   {
-    // The getLivemark callback is expected to receive a failure status but it
-    // is used just to serialize, so doesn't matter.
+    // The getLivemark callback may fail, but it is used just to serialize,
+    // so it doesn't matter.
     PlacesUtils.livemarks.getLivemark({ id: this.item.id })
-      .then(null, () => {
+      .then(null, null).then( () => {
         PlacesUtils.bookmarks.removeItem(this.item.id);
       });
   }
 };
 
 
 /**
  * Transaction for removing a livemark item.