mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 778501 Part 1: mLanguage should be an nsCOMPtr r=roc
This commit is contained in:
parent
ba6eb75773
commit
31275596fb
@ -297,7 +297,6 @@ nsPresContext::~nsPresContext()
|
||||
this);
|
||||
|
||||
NS_IF_RELEASE(mDeviceContext);
|
||||
NS_IF_RELEASE(mLanguage);
|
||||
}
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_CLASS(nsPresContext)
|
||||
@ -1121,14 +1120,12 @@ void
|
||||
nsPresContext::UpdateCharSet(const nsCString& aCharSet)
|
||||
{
|
||||
if (mLangService) {
|
||||
NS_IF_RELEASE(mLanguage);
|
||||
mLanguage = mLangService->LookupCharSet(aCharSet.get()).get(); // addrefs
|
||||
mLanguage = mLangService->LookupCharSet(aCharSet.get());
|
||||
// this will be a language group (or script) code rather than a true language code
|
||||
|
||||
// bug 39570: moved from nsLanguageAtomService::LookupCharSet()
|
||||
if (mLanguage == nsGkAtoms::Unicode) {
|
||||
NS_RELEASE(mLanguage);
|
||||
NS_IF_ADDREF(mLanguage = mLangService->GetLocaleLanguage());
|
||||
mLanguage = mLangService->GetLocaleLanguage();
|
||||
}
|
||||
ResetCachedFontPrefs();
|
||||
}
|
||||
|
@ -1105,7 +1105,7 @@ protected:
|
||||
// This may in fact hold a langGroup such as x-western rather than
|
||||
// a specific language, however (e.g, if it is inferred from the
|
||||
// charset rather than explicitly specified as a lang attribute).
|
||||
nsIAtom* mLanguage; // [STRONG]
|
||||
nsCOMPtr<nsIAtom> mLanguage;
|
||||
|
||||
public:
|
||||
// The following are public member variables so that we can use them
|
||||
|
Loading…
Reference in New Issue
Block a user