mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1049234 - deal with broken settings in feedwriter instead of dying completely, r=jaws
This commit is contained in:
parent
5ed0176e11
commit
b6351f0bb5
@ -889,7 +889,13 @@ FeedWriter.prototype = {
|
||||
switch (handler) {
|
||||
case "web": {
|
||||
if (this._handlersMenuList) {
|
||||
var url = prefs.getComplexValue(getPrefWebForType(feedType), Ci.nsISupportsString).data;
|
||||
var url;
|
||||
try {
|
||||
url = prefs.getComplexValue(getPrefWebForType(feedType), Ci.nsISupportsString).data;
|
||||
} catch (ex) {
|
||||
LOG("FeedWriter._setSelectedHandler: invalid or no handler in prefs");
|
||||
return;
|
||||
}
|
||||
var handlers =
|
||||
this._handlersMenuList.getElementsByAttribute("webhandlerurl", url);
|
||||
if (handlers.length == 0) {
|
||||
@ -1039,6 +1045,10 @@ FeedWriter.prototype = {
|
||||
var handlers = wccr.getContentHandlers(this._getMimeTypeForFeedType(feedType));
|
||||
if (handlers.length != 0) {
|
||||
for (var i = 0; i < handlers.length; ++i) {
|
||||
if (!handlers[i].uri) {
|
||||
LOG("Handler with name " + handlers[i].name + " has no URI!? Skipping...");
|
||||
continue;
|
||||
}
|
||||
menuItem = liveBookmarksMenuItem.cloneNode(false);
|
||||
menuItem.removeAttribute("selected");
|
||||
menuItem.className = "menuitem-iconic";
|
||||
|
Loading…
Reference in New Issue
Block a user