зеркало из https://github.com/mozilla/pjs.git
Bug 349598: remove unnecessary dumps, r=dietrich
This commit is contained in:
Родитель
089c0b9eae
Коммит
895ee2682e
|
@ -113,7 +113,7 @@ nsURLFormatterService.prototype = {
|
|||
return repl[aKey];
|
||||
if (_this._defaults[aKey]) // supported defaults
|
||||
return _this._defaults[aKey]();
|
||||
dump(aKey + " not found");
|
||||
Components.utils.reportError("formatURL: Couldn't find value for key: " + aKey);
|
||||
return '';
|
||||
}
|
||||
return aFormat.replace(/%([A-Z]+)%/gi, replacer);
|
||||
|
@ -126,16 +126,20 @@ nsURLFormatterService.prototype = {
|
|||
var format = null;
|
||||
var PS = Cc['@mozilla.org/preferences-service;1'].
|
||||
getService(Ci.nsIPrefBranch);
|
||||
|
||||
try {
|
||||
format = PS.getComplexValue(aPref, Ci.nsIPrefLocalizedString).data;
|
||||
} catch(ex) { dump(ex + "\n"); }
|
||||
} catch(ex) {}
|
||||
|
||||
if (!format) {
|
||||
format = PS.getComplexValue(aPref, Ci.nsISupportsString).data;
|
||||
}
|
||||
if (!format) {
|
||||
dump(aPref + " not found");
|
||||
return 'about:blank';
|
||||
try {
|
||||
format = PS.getComplexValue(aPref, Ci.nsISupportsString).data;
|
||||
} catch(ex) {
|
||||
Components.utils.reportError("formatURLPref: Couldn't get pref: " + aPref);
|
||||
return "about:blank";
|
||||
}
|
||||
}
|
||||
|
||||
return this.formatURL(format, aVars);
|
||||
},
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче