mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 614787 - Delay expiration database setup to the first expiration.
r=dietrich,sdwilsh a=blocking
This commit is contained in:
parent
7d33573bea
commit
a3f54fd85f
@ -408,12 +408,16 @@ const EXPIRATION_QUERIES = {
|
||||
|
||||
function nsPlacesExpiration()
|
||||
{
|
||||
this._db = Cc["@mozilla.org/browser/nav-history-service;1"].
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//// Smart Getters
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "_db", function () {
|
||||
let db = Cc["@mozilla.org/browser/nav-history-service;1"].
|
||||
getService(Ci.nsPIPlacesDatabase).
|
||||
DBConnection;
|
||||
|
||||
// Create a temp table for notifications.
|
||||
this._db.executeSimpleSQL(
|
||||
// Create the temporary notifications table.
|
||||
let stmt = db.createAsyncStatement(
|
||||
"CREATE TEMP TABLE expiration_notify ( "
|
||||
+ " id INTEGER PRIMARY KEY "
|
||||
+ ", v_id INTEGER "
|
||||
@ -421,11 +425,12 @@ function nsPlacesExpiration()
|
||||
+ ", url TEXT NOT NULL "
|
||||
+ ", visit_date INTEGER "
|
||||
+ ", expected_results INTEGER NOT NULL "
|
||||
+ ")"
|
||||
);
|
||||
+ ") ");
|
||||
stmt.executeAsync();
|
||||
stmt.finalize();
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//// Smart Getters
|
||||
return db;
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(this, "_hsn",
|
||||
"@mozilla.org/browser/nav-history-service;1",
|
||||
|
Loading…
Reference in New Issue
Block a user