Bug 412688: Enforce 'one url-classifier update at a time' in the dbservice rather than just the stream updater. r=tony, a=schrep

This commit is contained in:
2008-01-23 11:30:54 -08:00
parent b82e57fb48
commit 23444daa18
5 changed files with 42 additions and 10 deletions

View File

@@ -90,12 +90,16 @@ function PROT_MalwareWarden() {
updateSuccess: function(requestedTimeout) { }
};
dbService_.beginUpdate(listener);
dbService_.beginStream();
dbService_.updateStream(testUpdate);
dbService_.finishStream();
dbService_.finishUpdate();
try {
dbService_.beginUpdate(listener);
dbService_.beginStream();
dbService_.updateStream(testUpdate);
dbService_.finishStream();
dbService_.finishUpdate();
} catch(ex) {
// beginUpdate will throw harmlessly if there's an existing update
// in progress, ignore failures.
}
G_Debug(this, "malwareWarden initialized");
}