Fix bug # 20542: make global history flush-able, and try and flush in on Shutdown()

This commit is contained in:
rjc%netscape.com 2006-09-14 05:44:14 +00:00
Родитель 504dbe1977
Коммит f2d2d16331
1 изменённых файлов: 11 добавлений и 1 удалений

Просмотреть файл

@ -50,7 +50,7 @@ function UpdateHistory(event)
{
try
{
var history = getService( "component://netscape/browser/global-history", "nsIGlobalHistory" );
var history = getService( "component://netscape/browser/global-history", "nsIGlobalHistory" );
if (history) history.SetPageTitle(window.content.location.href, window.content.document.title);
}
catch (ex)
@ -164,6 +164,16 @@ function Shutdown()
{
}
try
{
// give history a change at flushing to disk also
var history = getService( "component://netscape/browser/global-history", "nsIRDFRemoteDataSource" );
if (history) history.Flush();
}
catch (ex)
{
}
if ( appCore )
appCore.close();
}