final part of fix for 46712 - flush the string bundle cache when the locale changes

r=hyatt
This commit is contained in:
alecf%netscape.com 2000-08-08 06:24:56 +00:00
Родитель 4ece688aa5
Коммит 53fe053e36
2 изменённых файлов: 16 добавлений и 0 удалений

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

@ -44,6 +44,7 @@
#include "nsHashtable.h"
#include "nsString.h"
#include "nsXPIDLString.h"
#include "nsIStringBundle.h"
#include "nsISimpleEnumerator.h"
#include "nsNetUtil.h"
#include "nsFileLocations.h"
@ -85,6 +86,7 @@ static NS_DEFINE_CID(kRDFXMLDataSourceCID, NS_RDFXMLDATASOURCE_CID);
static NS_DEFINE_CID(kRDFContainerUtilsCID, NS_RDFCONTAINERUTILS_CID);
static NS_DEFINE_CID(kCSSLoaderCID, NS_CSS_LOADER_CID);
static NS_DEFINE_CID(kImageManagerCID, NS_IMAGEMANAGER_CID);
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
class nsChromeRegistry;
@ -1931,6 +1933,12 @@ nsChromeRegistry::ReloadChrome()
xulCache->Flush();
}
nsCOMPtr<nsIStringBundleService> bundleService =
do_GetService(kStringBundleServiceCID, &rv);
if (NS_SUCCEEDED(rv))
bundleService->FlushBundles();
// Get the window mediator
NS_WITH_SERVICE(nsIWindowMediator, windowMediator, kWindowMediatorCID, &rv);
if (NS_SUCCEEDED(rv)) {

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

@ -44,6 +44,7 @@
#include "nsHashtable.h"
#include "nsString.h"
#include "nsXPIDLString.h"
#include "nsIStringBundle.h"
#include "nsISimpleEnumerator.h"
#include "nsNetUtil.h"
#include "nsFileLocations.h"
@ -85,6 +86,7 @@ static NS_DEFINE_CID(kRDFXMLDataSourceCID, NS_RDFXMLDATASOURCE_CID);
static NS_DEFINE_CID(kRDFContainerUtilsCID, NS_RDFCONTAINERUTILS_CID);
static NS_DEFINE_CID(kCSSLoaderCID, NS_CSS_LOADER_CID);
static NS_DEFINE_CID(kImageManagerCID, NS_IMAGEMANAGER_CID);
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
class nsChromeRegistry;
@ -1931,6 +1933,12 @@ nsChromeRegistry::ReloadChrome()
xulCache->Flush();
}
nsCOMPtr<nsIStringBundleService> bundleService =
do_GetService(kStringBundleServiceCID, &rv);
if (NS_SUCCEEDED(rv))
bundleService->FlushBundles();
// Get the window mediator
NS_WITH_SERVICE(nsIWindowMediator, windowMediator, kWindowMediatorCID, &rv);
if (NS_SUCCEEDED(rv)) {