Bug 722956: clear async io timer, so it doesn't run after shutdown has started. r=philkon

This commit is contained in:
Benjamin Peterson 2012-07-12 16:36:41 -07:00
parent 52fde36de4
commit da659fcf4b
9 changed files with 19 additions and 0 deletions

View File

@ -27,6 +27,7 @@ function cleanup_and_advance() {
tracker.resetScore();
tracker.clearChangedIDs();
tracker._lazySave.clear();
reconciler._addons = {};
reconciler._changes = [];

View File

@ -377,4 +377,7 @@ function run_test() {
test_move_order();
test_orphan();
test_reparentOrphans();
if (engine._tracker._lazySave) {
engine._tracker._lazySave.clear();
}
}

View File

@ -62,6 +62,7 @@ function test_tracking() {
store.wipe();
tracker.clearChangedIDs();
tracker.resetScore();
tracker._lazySave.clear();
Svc.Obs.notify("weave:engine:stop-tracking");
}
}
@ -100,6 +101,7 @@ function test_onItemChanged() {
store.wipe();
tracker.clearChangedIDs();
tracker.resetScore();
tracker._lazySave.clear();
Svc.Obs.notify("weave:engine:stop-tracking");
}
}
@ -152,6 +154,7 @@ function test_onItemMoved() {
store.wipe();
tracker.clearChangedIDs();
tracker.resetScore();
tracker._lazySave.clear();
Svc.Obs.notify("weave:engine:stop-tracking");
}

View File

@ -42,5 +42,8 @@ function run_test() {
} finally {
_("Clean up.");
Svc.Form.removeAllEntries();
if (tracker._lazySave) {
tracker._lazySave.clear();
}
}
}

View File

@ -143,5 +143,6 @@ add_test(function test_stop_tracking_twice() {
add_test(function cleanup() {
_("Clean up.");
PlacesUtils.history.removeAllPages();
tracker._lazySave.clear();
run_next_test();
});

View File

@ -64,6 +64,7 @@ function test_tracking() {
store.wipe();
tracker.clearChangedIDs();
tracker.resetScore();
tracker._lazySave.clear();
Svc.Obs.notify("weave:engine:stop-tracking");
}
}

View File

@ -76,5 +76,8 @@ function run_test() {
} finally {
Svc.Obs.notify("weave:engine:stop-tracking");
prefs.resetBranch("");
if (tracker._lazySave) {
tracker._lazySave.clear();
}
}
}

View File

@ -108,4 +108,7 @@ function run_test() {
do_check_true(Utils.deepEquals(Object.keys(engine.getChangedIDs()),
[Clients.localID]));
do_check_eq(logs.length, idx); // test that setTabValue isn't called
if (tracker._lazySave) {
tracker._lazySave.clear();
}
}

View File

@ -22,4 +22,5 @@ function run_test() {
_("Adding without time defaults to current time");
tracker.addChangedID(id);
do_check_true(tracker.changedIDs[id] > 10);
tracker._lazySave.clear()
}