Bug 1276052 - Fix NS_ConvertUTF16toUTF8 usage. r=smaug

MozReview-Commit-ID: BLvxeSWpF6h
This commit is contained in:
Nicholas Hurley 2016-05-27 10:28:15 -07:00
parent 8e2fb1b139
commit 9e6ef0d3a6

View File

@ -824,7 +824,8 @@ nsPrefetchService::Observe(nsISupports *aSubject,
mDisabled = true;
}
else if (!strcmp(aTopic, NS_PREFBRANCH_PREFCHANGE_TOPIC_ID)) {
const char *pref = NS_ConvertUTF16toUTF8(aData).get();
const nsCString converted = NS_ConvertUTF16toUTF8(aData);
const char* pref = converted.get();
if (!strcmp(pref, PREFETCH_PREF)) {
if (Preferences::GetBool(PREFETCH_PREF, false)) {
if (mDisabled) {