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:
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user