Bug 469972 - leaking the places database connection in strange situations; r=dietrich

This commit is contained in:
Shawn Wilsher 2008-12-20 01:46:04 +01:00
parent 8503ace867
commit 4079f2d44e

View File

@ -90,6 +90,17 @@ function nsPlacesDBFlush()
// Create our timer to update everything
this._timer = this._newTimer();
//////////////////////////////////////////////////////////////////////////////
//// Smart Getters
this.__defineGetter__("_db", function() {
delete this._db;
return this._db = Cc["@mozilla.org/browser/nav-history-service;1"].
getService(Ci.nsPIPlacesDatabase).
DBConnection;
});
}
nsPlacesDBFlush.prototype = {
@ -312,16 +323,6 @@ nsPlacesDBFlush.prototype = {
])
};
//////////////////////////////////////////////////////////////////////////////
//// Smart Getters
nsPlacesDBFlush.prototype.__defineGetter__("_db", function() {
delete nsPlacesDBFlush._db;
return nsPlacesDBFlush._db = Cc["@mozilla.org/browser/nav-history-service;1"].
getService(Ci.nsPIPlacesDatabase).
DBConnection;
});
////////////////////////////////////////////////////////////////////////////////
//// Module Registration