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 199286 059763b431af25bb00876cffd7953fc1c0a206e5
parent 199285 96f87b42c039cdd60a60e19660b41cadc318252f
child 199287 a0be747a654e322d6a30e214367783b3c49dc92b
push id3624
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:49:01 +0000
treeherdermozilla-beta@b1a5da15899a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak, lsblakk
bugs1003839
milestone31.0a2
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.