diff --git a/browser/extensions/pdfjs/content/PdfStreamConverter.jsm b/browser/extensions/pdfjs/content/PdfStreamConverter.jsm index 3a26bcd2d3df..18b3985c3762 100644 --- a/browser/extensions/pdfjs/content/PdfStreamConverter.jsm +++ b/browser/extensions/pdfjs/content/PdfStreamConverter.jsm @@ -93,7 +93,7 @@ function getIntPref(pref, def) { function getStringPref(pref, def) { try { - return Services.prefs.getComplexValue(pref, Ci.nsISupportsString).data; + return Services.prefs.getStringPref(pref); } catch (ex) { return def; } diff --git a/browser/extensions/pdfjs/content/PdfjsChromeUtils.jsm b/browser/extensions/pdfjs/content/PdfjsChromeUtils.jsm index 33ff96656156..968e38ae1542 100644 --- a/browser/extensions/pdfjs/content/PdfjsChromeUtils.jsm +++ b/browser/extensions/pdfjs/content/PdfjsChromeUtils.jsm @@ -290,10 +290,7 @@ var PdfjsChromeUtils = { _setStringPref(aPrefName, aPrefValue) { this._ensurePreferenceAllowed(aPrefName); - let str = Cc["@mozilla.org/supports-string;1"] - .createInstance(Ci.nsISupportsString); - str.data = aPrefValue; - Services.prefs.setComplexValue(aPrefName, Ci.nsISupportsString, str); + Services.prefs.setStringPref(aPrefName, aPrefValue); }, /*