зеркало из https://github.com/mozilla/pjs.git
final part of fix for 46712 - flush the string bundle cache when the locale changes
r=hyatt
This commit is contained in:
Родитель
4ece688aa5
Коммит
53fe053e36
|
@ -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)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче