mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-28 04:35:33 +00:00
Bug 469972 - leaking the places database connection in strange situations; r=dietrich
This commit is contained in:
parent
8503ace867
commit
4079f2d44e
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user