Bug 1249702 - Fix e10s feed handling with auto content handler prefs. r=Gijs

MozReview-Commit-ID: 3ggmJxUmuxp
This commit is contained in:
J. Ryan Stinnett 2016-02-23 10:53:49 -06:00
parent a78f3444fe
commit 1fad784d0f
2 changed files with 1 additions and 23 deletions

View File

@ -901,28 +901,6 @@ WebContentConverterRegistrarContent.prototype = {
// do nothing, the next branch might have values
}
}
// We need to do this _after_ registering all of the available handlers,
// so that getWebContentHandlerByURI can return successfully.
let autoBranch;
try {
autoBranch = ps.getBranch(PREF_CONTENTHANDLERS_AUTO);
} catch (e) {
// No auto branch yet, that's fine
//LOG("WCCR.init: There is no auto branch, benign");
}
if (autoBranch) {
for (let type of autoBranch.getChildList("")) {
let uri = autoBranch.getCharPref(type);
if (uri) {
let handler = this.getWebContentHandlerByURI(type, uri);
if (handler) {
this._setAutoHandler(type, handler);
}
}
}
}
},
_typeIsRegistered(contentType, uri) {

View File

@ -46,7 +46,7 @@ this.Feeds = {
case "WCCR:setAutoHandler": {
let registrar = Cc["@mozilla.org/embeddor.implemented/web-content-handler-registrar;1"].
getService(Ci.nsIWebContentHandlerRegistrar);
getService(Ci.nsIWebContentConverterService);
registrar.setAutoHandler(data.contentType, data.handler);
break;
}