mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1249702 - Fix e10s feed handling with auto content handler prefs. r=Gijs
MozReview-Commit-ID: 3ggmJxUmuxp
This commit is contained in:
parent
a78f3444fe
commit
1fad784d0f
@ -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) {
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user