Bug 782272 - Only clear the _lazySave timer if it's there. r=gps
authorBenjamin Peterson <benjamin@python.org>
Mon, 24 Sep 2012 17:06:10 -0400
changeset 108050 426fd9c738348e9673283352d9692c26dcf9591a
parent 108049 fe5b75aa2b167af467f2a05d0c807545030a5c19
child 108051 b01c3760fce63ef5fe474dd5bc21f60b944003db
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
reviewersgps
bugs782272
milestone18.0a1
Bug 782272 - Only clear the _lazySave timer if it's there. r=gps
services/sync/tests/unit/test_history_tracker.js
--- a/services/sync/tests/unit/test_history_tracker.js
+++ b/services/sync/tests/unit/test_history_tracker.js
@@ -138,11 +138,13 @@ add_test(function test_stop_tracking_twi
     do_check_empty(tracker.changedIDs);
     run_next_test();
   });
 });
 
 add_test(function cleanup() {
    _("Clean up.");
   PlacesUtils.history.removeAllPages();
-  tracker._lazySave.clear();
+  if (tracker._lazySave) {
+    tracker._lazySave.clear();
+  }
   run_next_test();
 });