Backing out backout of history changes.
This commit is contained in:
Родитель
dbdd3d4788
Коммит
44b75a7f19
|
@ -431,23 +431,6 @@ function WindowFocusTimerCallback(element)
|
|||
}
|
||||
}
|
||||
|
||||
function BrowserFlushBookmarksAndHistory()
|
||||
{
|
||||
// Flush bookmarks and history (used when window closes or is cached).
|
||||
try {
|
||||
// If bookmarks are dirty, flush 'em to disk
|
||||
var bmks = Components.classes["@mozilla.org/browser/bookmarks-service;1"]
|
||||
.getService(Components.interfaces.nsIRDFRemoteDataSource);
|
||||
bmks.Flush();
|
||||
|
||||
// give history a chance at flushing to disk also
|
||||
var history = Components.classes["@mozilla.org/browser/global-history;1"]
|
||||
.getService(Components.interfaces.nsIRDFRemoteDataSource);
|
||||
history.Flush();
|
||||
} catch(ex) {
|
||||
}
|
||||
}
|
||||
|
||||
function Shutdown()
|
||||
{
|
||||
// remove remote support
|
||||
|
@ -466,8 +449,6 @@ function Shutdown()
|
|||
window.XULBrowserWindow.destroy();
|
||||
window.XULBrowserWindow = null;
|
||||
|
||||
BrowserFlushBookmarksAndHistory();
|
||||
|
||||
window.browserContentListener.close();
|
||||
// Close the app core.
|
||||
if (appCore)
|
||||
|
|
|
@ -2358,6 +2358,7 @@ nsGlobalHistory::Init()
|
|||
if (observerService) {
|
||||
observerService->AddObserver(this, "profile-before-change", PR_TRUE);
|
||||
observerService->AddObserver(this, "profile-do-change", PR_TRUE);
|
||||
observerService->AddObserver(this, "quit-application", PR_TRUE);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
@ -3464,6 +3465,8 @@ nsGlobalHistory::Observe(nsISupports *aSubject,
|
|||
}
|
||||
else if (!nsCRT::strcmp(aTopic, "profile-do-change"))
|
||||
rv = OpenDB();
|
||||
else if (!nsCRT::strcmp(aTopic, "quit-application"))
|
||||
rv = Flush();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче