Bug 614723. Don't get our acceptLangs unless we plan to use it. r=jwatt a=roc

--HG--
extra : rebase_source : 3f04cb498d6bf86e07ba82c393b4958d27e64449
This commit is contained in:
Boris Zbarsky 2010-11-24 21:13:59 -05:00
parent 223bcc21ec
commit cd1f4202c2

View File

@ -212,9 +212,6 @@ nsSVGFeatures::PassesConditionalProcessingTests(nsIContent *aContent,
return PR_TRUE;
}
const nsAutoString acceptLangs(aAcceptLangs ? *aAcceptLangs :
nsContentUtils::GetLocalizedStringPref("intl.accept_languages"));
// systemLanguage
//
// Evaluates to "true" if one of the languages indicated by user preferences
@ -224,6 +221,10 @@ nsSVGFeatures::PassesConditionalProcessingTests(nsIContent *aContent,
// that the first tag character following the prefix is "-".
if (aContent->GetAttr(kNameSpaceID_None, nsGkAtoms::systemLanguage,
value)) {
const nsAutoString acceptLangs(aAcceptLangs ? *aAcceptLangs :
nsContentUtils::GetLocalizedStringPref("intl.accept_languages"));
// Get our language preferences
if (!acceptLangs.IsEmpty()) {
return MatchesLanguagePreferences(value, acceptLangs);