mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-27 07:34:20 +00:00
Fixing bug 384796, Call to |nsIStringBundleOverride| always beats the embedding calls. r=mento, sr=roc, 1.9approval=dsicore. Trunk only.
This commit is contained in:
parent
8b13bd8798
commit
a5b7f050ea
@ -584,6 +584,7 @@ nsStringBundleService::Init()
|
||||
os->AddObserver(this, "memory-pressure", PR_TRUE);
|
||||
os->AddObserver(this, "profile-do-change", PR_TRUE);
|
||||
os->AddObserver(this, "chrome-flush-caches", PR_TRUE);
|
||||
os->AddObserver(this, "xpcom-category-entry-added", PR_TRUE);
|
||||
}
|
||||
|
||||
// instantiate the override service, if there is any.
|
||||
@ -602,7 +603,15 @@ nsStringBundleService::Observe(nsISupports* aSubject,
|
||||
if (strcmp("memory-pressure", aTopic) == 0 ||
|
||||
strcmp("profile-do-change", aTopic) == 0 ||
|
||||
strcmp("chrome-flush-caches", aTopic) == 0)
|
||||
{
|
||||
flushBundleCache();
|
||||
}
|
||||
else if (strcmp("xpcom-category-entry-added", aTopic) == 0 &&
|
||||
NS_LITERAL_STRING("xpcom-autoregistration").Equals(aSomeData))
|
||||
{
|
||||
mOverrideStrings = do_GetService(NS_STRINGBUNDLETEXTOVERRIDE_CONTRACTID);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user